atomic-storage: remove type dependency at segment level I/O
[controller.git] / opendaylight / md-sal / sal-akka-raft / src / main / java / org / opendaylight / controller / cluster / raft / base / messages / LeaderTransitioning.java
1 /*
2  * Copyright (c) 2015 Brocade Communications Systems, Inc. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8 package org.opendaylight.controller.cluster.raft.base.messages;
9
10 import static java.util.Objects.requireNonNull;
11
12 import java.io.Serializable;
13 import org.eclipse.jdt.annotation.NonNull;
14
15 /**
16  * Message sent from a leader to its followers to indicate leadership transfer is starting.
17  *
18  * @author Thomas Pantelis
19  */
20 public final class LeaderTransitioning implements Serializable {
21     private static final long serialVersionUID = 1L;
22
23     private final String leaderId;
24
25     public LeaderTransitioning(final @NonNull String leaderId) {
26         this.leaderId = requireNonNull(leaderId);
27     }
28
29     public @NonNull String getLeaderId() {
30         return leaderId;
31     }
32
33     @Override
34     public String toString() {
35         return "LeaderTransitioning [leaderId=" + leaderId + "]";
36     }
37 }