X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-akka-raft%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcluster%2Fraft%2FImmutableElectionTerm.java;h=5f7d08c08b0af75df0dc84210f3ae5fcb99fdaa5;hb=d0f46920468c8e4b67c68bd9058572b2d10d75f1;hp=56cda0307c8e35005b519fdaedfca62873ac6f3f;hpb=c9943f5bc72d4cde9356d3bd4cf73d36f4b2f754;p=controller.git 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 56cda0307c..5f7d08c08b 100644 --- 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 */ -public class ImmutableElectionTerm implements ElectionTerm { +public final class ImmutableElectionTerm implements ElectionTerm { 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; } @@ -32,12 +32,12 @@ public class ImmutableElectionTerm implements ElectionTerm { } @Override - public void update(long newTerm, String newVotedFor) { + public void update(final long newTerm, final String newVotedFor) { throw new UnsupportedOperationException(); } @Override - public void updateAndPersist(long newTerm, String newVotedFor) { + public void updateAndPersist(final long newTerm, final String newVotedFor) { throw new UnsupportedOperationException(); } @@ -46,7 +46,7 @@ public class ImmutableElectionTerm implements ElectionTerm { 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()); } }