class DeadlineFailureDetector extends FailureDetector
- Alphabetic
- By Inheritance
- DeadlineFailureDetector
- FailureDetector
- AnyRef
- Any
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new DeadlineFailureDetector(config: Config, ev: EventStream)
Constructor that reads parameters from config.
Constructor that reads parameters from config. Expecting config properties named
acceptable-heartbeat-pause
. - new DeadlineFailureDetector(acceptableHeartbeatPause: FiniteDuration, heartbeatInterval: FiniteDuration)(implicit clock: Clock)
- acceptableHeartbeatPause
Duration corresponding to number of potentially lost/delayed heartbeats that will be accepted before considering it to be an anomaly.
- heartbeatInterval
Expected heartbeat interval
- clock
The clock, returning current time in milliseconds, but can be faked for testing purposes. It is only used for measuring intervals (duration).
Value Members
- val acceptableHeartbeatPause: FiniteDuration
- final def heartbeat(): Unit
Notifies the FailureDetector that a heartbeat arrived from the monitored resource.
Notifies the FailureDetector that a heartbeat arrived from the monitored resource. This causes the FailureDetector to update its state.
- Definition Classes
- → FailureDetector
- val heartbeatInterval: FiniteDuration
- def isAvailable: Boolean
Returns true if the resource is considered to be up and healthy and returns false otherwise.
Returns true if the resource is considered to be up and healthy and returns false otherwise.
- Definition Classes
- → FailureDetector
- def isMonitoring: Boolean
Returns true if the failure detector has received any heartbeats and started monitoring of the resource.
Returns true if the failure detector has received any heartbeats and started monitoring of the resource.
- Definition Classes
- → FailureDetector
Implementation of failure detector using an absolute timeout of missing heartbeats to trigger unavailability.
#isAvailable will return
false
if there is no #heartbeat within the durationheartbeatInterval + acceptableHeartbeatPause
.