Code Review
/
controller.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Fixup comparison formatting
[controller.git]
/
opendaylight
/
md-sal
/
sal-akka-raft
/
src
/
main
/
java
/
org
/
opendaylight
/
controller
/
cluster
/
raft
/
ImmutableElectionTerm.java
diff --git
a/opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/ImmutableElectionTerm.java
b/opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/ImmutableElectionTerm.java
index 2760b4831852952869f5d062f9ff9c1d05fda661..5f7d08c08b0af75df0dc84210f3ae5fcb99fdaa5 100644
(file)
--- a/
opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/ImmutableElectionTerm.java
+++ b/
opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/ImmutableElectionTerm.java
@@
-12,11
+12,11
@@
package org.opendaylight.controller.cluster.raft;
*
* @author Thomas Pantelis
*/
*
* @author Thomas Pantelis
*/
-public class ImmutableElectionTerm implements ElectionTerm {
+public
final
class ImmutableElectionTerm implements ElectionTerm {
private final long currentTerm;
private final String votedFor;
private final long currentTerm;
private final String votedFor;
- private ImmutableElectionTerm(
long currentTerm,
String votedFor) {
+ private ImmutableElectionTerm(
final long currentTerm, final
String votedFor) {
this.currentTerm = currentTerm;
this.votedFor = votedFor;
}
this.currentTerm = currentTerm;
this.votedFor = votedFor;
}
@@
-32,12
+32,12
@@
public class ImmutableElectionTerm implements ElectionTerm {
}
@Override
}
@Override
- public void update(
long currentTerm, String v
otedFor) {
+ public void update(
final long newTerm, final String newV
otedFor) {
throw new UnsupportedOperationException();
}
@Override
throw new UnsupportedOperationException();
}
@Override
- public void updateAndPersist(
long currentTerm, String v
otedFor) {
+ public void updateAndPersist(
final long newTerm, final String newV
otedFor) {
throw new UnsupportedOperationException();
}
throw new UnsupportedOperationException();
}
@@
-46,7
+46,7
@@
public class ImmutableElectionTerm implements ElectionTerm {
return "ImmutableElectionTerm [currentTerm=" + currentTerm + ", votedFor=" + votedFor + "]";
}
return "ImmutableElectionTerm [currentTerm=" + currentTerm + ", votedFor=" + votedFor + "]";
}
- public static ElectionTerm copyOf(ElectionTerm from) {
+ public static ElectionTerm copyOf(
final
ElectionTerm from) {
return new ImmutableElectionTerm(from.getCurrentTerm(), from.getVotedFor());
}
}
return new ImmutableElectionTerm(from.getCurrentTerm(), from.getVotedFor());
}
}