Class PriorityElectionTimer

java.lang.Object
io.atomix.raft.impl.PriorityElectionTimer
All Implemented Interfaces:
ElectionTimer

public class PriorityElectionTimer extends Object implements ElectionTimer
  • 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: ElectionTimer
      Reset the timer

      When `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:
      reset in interface ElectionTimer
    • cancel

      public void cancel()
      Description copied from interface: ElectionTimer
      Cancel the timer
      Specified by:
      cancel in interface ElectionTimer