Bug 7391: Fix out-of-order LeaderStateChange events
[controller.git] / opendaylight / md-sal / sal-akka-raft / src / main / java / org / opendaylight / controller / cluster / raft / messages / AbstractRaftRPC.java
index 33d8a6868680e03e09155332fc89b6089231bd19..fc5255e2712cea11e9932d18ecd9a898cae0c660 100644 (file)
@@ -9,10 +9,12 @@
 package org.opendaylight.controller.cluster.raft.messages;
 
 public class AbstractRaftRPC implements RaftRPC {
+    private static final long serialVersionUID = -6061342433962854822L;
+
     // term
-    protected long term;
+    private long term;
 
-    protected AbstractRaftRPC(long term){
+    protected AbstractRaftRPC(long term) {
         this.term = term;
     }
 
@@ -20,11 +22,12 @@ public class AbstractRaftRPC implements RaftRPC {
     public AbstractRaftRPC() {
     }
 
+    @Override
     public long getTerm() {
         return term;
     }
 
-    public void setTerm(long term) {
+    protected void setTerm(long term) {
         this.term = term;
     }
 }