2 * Copyright (c) 2014 Cisco 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
9 package org.opendaylight.controller.cluster.notifications;
11 import java.io.Serializable;
14 * Notification message representing a Role change of a cluster member
16 * Roles generally are Leader, Follower and Candidate. But can be based on the consensus strategy/implementation
18 * The Listener could be in a separate ActorSystem and hence this message needs to be Serializable
20 public class RoleChangeNotification implements Serializable {
21 private String memberId;
22 private String oldRole;
23 private String newRole;
25 public RoleChangeNotification(String memberId, String oldRole, String newRole) {
26 this.memberId = memberId;
27 this.oldRole = oldRole;
28 this.newRole = newRole;
31 public String getMemberId() {
35 public String getOldRole() {
39 public String getNewRole() {