+ public Map<String, Boolean> getPeerVotingStates() {
+ return peerVotingStates;
+ }
+
+ public String getCustomRaftPolicyClassName() {
+ return customRaftPolicyClassName;
+ }
+
+ public abstract static class AbstractBuilder<T extends AbstractBuilder<T>> {
+ @SuppressWarnings("unchecked")
+ protected T self() {
+ return (T) this;
+ }
+
+ @Nonnull
+ protected abstract OnDemandRaftState state();
+
+ public T lastLogIndex(long value) {
+ state().lastLogIndex = value;
+ return self();
+ }
+
+ public T lastLogTerm(long value) {
+ state().lastLogTerm = value;
+ return self();
+ }
+
+ public T currentTerm(long value) {
+ state().currentTerm = value;
+ return self();
+ }