Interface ElectionTimer

All Known Implementing Classes:
PriorityElectionTimer, RandomizedElectionTimer

public interface ElectionTimer
An election timer controls when a node triggers an election.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Cancel the timer
    void
    Reset the timer
  • Method Details

    • reset

      void reset()
      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.

    • cancel

      void cancel()
      Cancel the timer