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=4d2bad5c2effe1f55a7abb3e74786e30390abaab;hb=a469dbcec569cc972df0cd57cf725a2173d2604a;hp=5f185cbb9c872efe200522c3b93b554623157dd7;hpb=cf5be659d906cc80d52647cb516bbab435156742;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 5f185cbb9c..4d2bad5c2e 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 @@ -21,12 +21,26 @@ public interface FollowerLogInformation { */ public long incrNextIndex(); + /** + * Decrement the value of the nextIndex + * @return + */ + public long decrNextIndex(); + + /** + * + * @param nextIndex + */ + void setNextIndex(long nextIndex); + /** * Increment the value of the matchIndex * @return */ public long incrMatchIndex(); + public void setMatchIndex(long matchIndex); + /** * The identifier of the follower * This could simply be the url of the remote actor @@ -47,5 +61,21 @@ public interface FollowerLogInformation { */ public AtomicLong getMatchIndex(); + /** + * Checks if the follower is active by comparing the last updated with the duration + * @return boolean + */ + public boolean isFollowerActive(); + + /** + * restarts the timeout clock of the follower + */ + public void markFollowerActive(); + + /** + * This will stop the timeout clock + */ + public void markFollowerInActive(); + }