* set currentTerm = T, convert to follower (ยง5.1)
*/
public abstract class AbstractRaftActorBehavior implements RaftActorBehavior {
-
- protected static final ElectionTimeout ELECTION_TIMEOUT = new ElectionTimeout();
-
/**
* Information about the RaftActor whose behavior this class represents
*/
if(canStartElection()) {
// Schedule an election. When the scheduler triggers an ElectionTimeout message is sent to itself
electionCancel = context.getActorSystem().scheduler().scheduleOnce(interval, context.getActor(),
- ELECTION_TIMEOUT,context.getActorSystem().dispatcher(), context.getActor());
+ ElectionTimeout.INSTANCE, context.getActorSystem().dispatcher(), context.getActor());
}
}