BUG 2817 - Basic implementation of RemoveServer in the Raft code
[controller.git] / opendaylight / md-sal / sal-akka-raft / src / main / java / org / opendaylight / controller / cluster / raft / messages / AbstractServerChangeReply.java
1 /*
2  * Copyright (c) 2015 Brocade Communications 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 package org.opendaylight.controller.cluster.raft.messages;
9
10 import java.io.Serializable;
11
12 /**
13  * Abstract base class for a server configuration change reply.
14  *
15  * @author Thomas Pantelis
16  */
17 public class AbstractServerChangeReply implements Serializable {
18     private static final long serialVersionUID = 1L;
19
20     private final String leaderHint;
21     private final ServerChangeStatus status;
22
23     public AbstractServerChangeReply(ServerChangeStatus status, String leaderHint) {
24         this.status = status;
25         this.leaderHint = leaderHint;
26     }
27
28     public static long getSerialversionuid() {
29         return serialVersionUID;
30     }
31
32     public String getLeaderHint() {
33         return leaderHint;
34     }
35
36     public ServerChangeStatus getStatus() {
37         return status;
38     }
39
40     @Override
41     public String toString() {
42         return getClass().getSimpleName() + " [status=" + status + ", leaderHint=" + leaderHint + "]";
43     }
44 }