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%2FFollowerLogInformation.java;h=07b6b617aaa862b472fb479be247479e1096f434;hb=d1d24d3742ffcda5e16a1d35e15a5627d5eb05f9;hp=73c81afd187d2791703c1428beacbc8348abda69;hpb=20156b149d56b1b14a06d344366b8e1af1c22fe8;p=controller.git diff --git a/opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/FollowerLogInformation.java b/opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/FollowerLogInformation.java index 73c81afd18..07b6b617aa 100644 --- a/opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/FollowerLogInformation.java +++ b/opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/FollowerLogInformation.java @@ -25,10 +25,13 @@ public interface FollowerLogInformation { long decrNextIndex(); /** + * Sets the index of the next log entry for this follower. * * @param nextIndex + * @return true if the new index differed from the current index and the current index was updated, false + * otherwise. */ - void setNextIndex(long nextIndex); + boolean setNextIndex(long nextIndex); /** * Increment the value of the matchIndex @@ -36,7 +39,14 @@ public interface FollowerLogInformation { */ long incrMatchIndex(); - void setMatchIndex(long matchIndex); + /** + * Sets the index of the highest log entry for this follower. + * + * @param matchIndex + * @return true if the new index differed from the current index and the current index was updated, false + * otherwise. + */ + boolean setMatchIndex(long matchIndex); /** * The identifier of the follower @@ -81,4 +91,10 @@ public interface FollowerLogInformation { */ long timeSinceLastActivity(); + /** + * This method checks if it is ok to replicate + * + * @return true if it is ok to replicate + */ + boolean okToReplicate(); }