2 * Copyright (c) 2015 Brocade Communications Systems, Inc. and others. All rights reserved.
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
8 package org.opendaylight.controller.cluster.raft.base.messages;
10 import static java.util.Objects.requireNonNull;
12 import java.io.Serializable;
13 import org.eclipse.jdt.annotation.NonNull;
16 * Message sent from a leader to its followers to indicate leadership transfer is starting.
18 * @author Thomas Pantelis
20 public final class LeaderTransitioning implements Serializable {
21 private static final long serialVersionUID = 1L;
23 private final String leaderId;
25 public LeaderTransitioning(final @NonNull String leaderId) {
26 this.leaderId = requireNonNull(leaderId);
29 public @NonNull String getLeaderId() {
34 public String toString() {
35 return "LeaderTransitioning [leaderId=" + leaderId + "]";