package timer
- Alphabetic
- Public
- All
Type Members
- class DefaultClock extends RaftClock with AutoCloseable
-
trait
RaftClock extends AnyRef
Represents the functions required to control a member node's election and heartbeat timeouts.
Represents the functions required to control a member node's election and heartbeat timeouts.
Implementations should introduce an element of randomisation when resetting the receive heartbeat timeouts, presumably based on some configuration, in order to follow the Raft spec.
The intention being to reduce the likelihood of multiple nodes becoming candidates at the same time.
-
class
RandomTimer extends AnyRef
A utility class for use when implementing a RaftClock.
A utility class for use when implementing a RaftClock. It simply contains a 'next' for producing random timeout durations based around a percentage.
e.g. if you wanted to timeout +/- 25% of 1 minute, 'next' would produce values between 45 and 75 seconds (60 seconds plus or minus 25%, or 15 seconds)
- trait TimerCallback[Result] extends AnyRef
- class Timers extends AnyRef
Value Members
- object DefaultClock
- object RaftClock
- object RandomTimer