+ long NO_INDEX = -1;
+
+ /**
+ * Increments the value of the follower's next index.
+ *
+ * @return the new value of nextIndex.
+ */
+ long incrNextIndex();
+
+ /**
+ * Decrements the value of the follower's next index.
+ *
+ * @return true if the next index was decremented, ie it was previously >= 0, false otherwise.
+ */
+ boolean decrNextIndex();
+
+ /**
+ * Sets the index of the follower's next log entry.
+ *
+ * @param nextIndex the new index.
+ * @return true if the new index differed from the current index and the current index was updated, false
+ * otherwise.
+ */
+ boolean setNextIndex(long nextIndex);
+
+ /**
+ * Increments the value of the follower's match index.
+ *
+ * @return the new value of matchIndex.
+ */
+ long incrMatchIndex();
+
+ /**
+ * Sets the index of the follower's highest log entry.
+ *
+ * @param matchIndex the new index.
+ * @return true if the new index differed from the current index and the current index was updated, false
+ * otherwise.
+ */
+ boolean setMatchIndex(long matchIndex);
+
+ /**
+ * Returns the identifier of the follower.
+ *
+ * @return the identifier of the follower.
+ */
+ String getId();
+
+ /**
+ * Returns the index of the next log entry to send to the follower.
+ *
+ * @return index of the follower's next log entry.
+ */
+ long getNextIndex();
+
+ /**
+ * Returns the index of highest log entry known to be replicated on the follower.
+ *
+ * @return the index of highest log entry.
+ */
+ long getMatchIndex();
+
+ /**
+ * Checks if the follower is active by comparing the time of the last activity with the election time out. The
+ * follower is active if some activity has occurred for the follower within the election time out interval.
+ *
+ * @return true if follower is active, false otherwise.
+ */
+ boolean isFollowerActive();