+ public void setNeedsLeaderAddress(final boolean value) {
+ needsLeaderAddress = value;
+ }
+
+ public @Nullable String needsLeaderAddress(final String leaderId) {
+ return needsLeaderAddress ? context.getPeerAddress(leaderId) : null;
+ }
+
+ public boolean hasStaleCommitIndex(final long commitIndex) {
+ return sentCommitIndex != commitIndex;
+ }
+
+ public void setSentCommitIndex(final long commitIndex) {
+ sentCommitIndex = commitIndex;
+ }
+