private volatile String lastVotedFor;
private volatile long commitIndex = 0;
private volatile long lastApplied = 0;
public <M extends Member> StateContext(StateMachine stateMachine, Log log, Cluster<M> cluster, Protocol<M> protocol, CopycatConfig config) {
this.stateMachineExecutor = new StateMachineExecutor(stateMachine);
this.log = log;
this.config = config;
this.cluster = cluster;
this.clusterManager = new ClusterManager<>(cluster, protocol);
}