Fix followerDistributedDataStore tear down
[controller.git] / opendaylight / md-sal / sal-clustering-commons / src / main / java / org / opendaylight / controller / cluster / notifications / RoleChanged.java
1 /*
2  * Copyright (c) 2014, 2015 Cisco 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
9 package org.opendaylight.controller.cluster.notifications;
10
11 /**
12  * Role Change message initiated internally from the  Raft Actor when a the behavior/role changes.
13  * Since its internal , need not be serialized
14  */
15 public class RoleChanged {
16     private final String memberId;
17     private final String oldRole;
18     private final String newRole;
19
20     public RoleChanged(String memberId, String oldRole, String newRole) {
21         this.memberId = memberId;
22         this.oldRole = oldRole;
23         this.newRole = newRole;
24     }
25
26     public String getMemberId() {
27         return memberId;
28     }
29
30     public String getOldRole() {
31         return oldRole;
32     }
33
34     public String getNewRole() {
35         return newRole;
36     }
37
38     @Override
39     public String toString() {
40         return "RoleChanged [memberId=" + memberId + ", oldRole=" + oldRole + ", newRole=" + newRole + "]";
41     }
42 }