Package io.atomix.raft.impl
Class PriorityElectionTimer
java.lang.Object
io.atomix.raft.impl.PriorityElectionTimer
- All Implemented Interfaces:
ElectionTimer
-
Constructor Summary
ConstructorsConstructorDescriptionPriorityElectionTimer(Duration electionTimeout, ThreadContext threadContext, Runnable triggerElection, org.slf4j.Logger log, int initialTargetPriority, int nodePriority) -
Method Summary
Modifier and TypeMethodDescriptionvoidcancel()Cancel the timervoidreset()Reset the timervoidsetNodePriority(int newPriority)
-
Constructor Details
-
PriorityElectionTimer
public PriorityElectionTimer(Duration electionTimeout, ThreadContext threadContext, Runnable triggerElection, org.slf4j.Logger log, int initialTargetPriority, int nodePriority)
-
-
Method Details
-
reset
public void reset()Description copied from interface:ElectionTimerReset the timerWhen `reset` is called, the previous timer is cancelled and a new timer will be started. After a specific duration, depending on the implementation, the election will be triggered.
- Specified by:
resetin interfaceElectionTimer
-
cancel
public void cancel()Description copied from interface:ElectionTimerCancel the timer- Specified by:
cancelin interfaceElectionTimer
-
setNodePriority
public void setNodePriority(int newPriority)
-