BUG 2773 : Transition Shard to Leader state when it has no peers
[controller.git] / opendaylight / md-sal / sal-clustering-commons / src / main / java / org / opendaylight / controller / cluster / notifications / RoleChanged.java
1 package org.opendaylight.controller.cluster.notifications;
2
3 /**
4  * Role Change message initiated internally from the  Raft Actor when a the behavior/role changes.
5  *
6  * Since its internal , need not be serialized
7  *
8  */
9 public class RoleChanged {
10     private String memberId;
11     private String oldRole;
12     private String newRole;
13
14     public RoleChanged(String memberId, String oldRole, String newRole) {
15         this.memberId = memberId;
16         this.oldRole = oldRole;
17         this.newRole = newRole;
18     }
19
20     public String getMemberId() {
21         return memberId;
22     }
23
24     public String getOldRole() {
25         return oldRole;
26     }
27
28     public String getNewRole() {
29         return newRole;
30     }
31
32     @Override
33     public String toString() {
34         return "RoleChanged{" +
35                 "memberId='" + memberId + '\'' +
36                 ", oldRole='" + oldRole + '\'' +
37                 ", newRole='" + newRole + '\'' +
38                 '}';
39     }
40 }

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.