Fix license header violations in sal-clustering-commons
[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  *
14  * Since its internal , need not be serialized
15  *
16  */
17 public class RoleChanged {
18     private String memberId;
19     private String oldRole;
20     private String newRole;
21
22     public RoleChanged(String memberId, String oldRole, String newRole) {
23         this.memberId = memberId;
24         this.oldRole = oldRole;
25         this.newRole = newRole;
26     }
27
28     public String getMemberId() {
29         return memberId;
30     }
31
32     public String getOldRole() {
33         return oldRole;
34     }
35
36     public String getNewRole() {
37         return newRole;
38     }
39
40     @Override
41     public String toString() {
42         return "RoleChanged{" +
43                 "memberId='" + memberId + '\'' +
44                 ", oldRole='" + oldRole + '\'' +
45                 ", newRole='" + newRole + '\'' +
46                 '}';
47     }
48 }