Code Review
/
controller.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
BUG-5626: refactor BehaviorStateHolder
[controller.git]
/
opendaylight
/
md-sal
/
sal-akka-raft
/
src
/
main
/
java
/
org
/
opendaylight
/
controller
/
cluster
/
raft
/
messages
/
RequestVoteReply.java
diff --git
a/opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/messages/RequestVoteReply.java
b/opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/messages/RequestVoteReply.java
index da3ba5c39f6989b86c1f76b7830d2c0426302ddb..ea56aeca568784dca1e72d6f7295126bd711fdd1 100644
(file)
--- a/
opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/messages/RequestVoteReply.java
+++ b/
opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/messages/RequestVoteReply.java
@@
-8,10
+8,10
@@
package org.opendaylight.controller.cluster.raft.messages;
package org.opendaylight.controller.cluster.raft.messages;
-public class RequestVoteReply extends AbstractRaftRPC {
- private static final long serialVersionUID =
1
L;
+public
final
class RequestVoteReply extends AbstractRaftRPC {
+ private static final long serialVersionUID =
8427899326488775660
L;
- // true means candidate received vot
+ // true means candidate received vot
e
private final boolean voteGranted;
public RequestVoteReply(long term, boolean voteGranted) {
private final boolean voteGranted;
public RequestVoteReply(long term, boolean voteGranted) {
@@
-19,11
+19,14
@@
public class RequestVoteReply extends AbstractRaftRPC {
this.voteGranted = voteGranted;
}
this.voteGranted = voteGranted;
}
- public long getTerm() {
- return term;
- }
-
public boolean isVoteGranted() {
return voteGranted;
}
public boolean isVoteGranted() {
return voteGranted;
}
+
+ @Override
+ public String toString() {
+ StringBuilder builder = new StringBuilder();
+ builder.append("RequestVoteReply [term=").append(getTerm()).append(", voteGranted=").append(voteGranted).append("]");
+ return builder.toString();
+ }
}
}