DeadlineFailureDetector

org.apache.pekko.remote.DeadlineFailureDetector
class DeadlineFailureDetector(val acceptableHeartbeatPause: FiniteDuration, val heartbeatInterval: FiniteDuration)(implicit clock: Clock) extends 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 duration heartbeatInterval + acceptableHeartbeatPause.

Value parameters

acceptableHeartbeatPause

Duration corresponding to number of potentially lost/delayed heartbeats that will be accepted before considering it to be an anomaly.

clock

The clock, returning current time in milliseconds, but can be faked for testing purposes. It is only used for measuring intervals (duration).

heartbeatInterval

Expected heartbeat interval

Attributes

Source
DeadlineFailureDetector.scala
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Constructors

def this(config: Config, ev: EventStream)

Constructor that reads parameters from config. Expecting config properties named acceptable-heartbeat-pause.

Constructor that reads parameters from config. Expecting config properties named acceptable-heartbeat-pause.

Attributes

Source
DeadlineFailureDetector.scala

Concrete methods

final override def heartbeat(): Unit

Notifies the FailureDetector that a heartbeat arrived from the monitored resource. This causes the FailureDetector to update its state.

Notifies the FailureDetector that a heartbeat arrived from the monitored resource. This causes the FailureDetector to update its state.

Attributes

Definition Classes
Source
DeadlineFailureDetector.scala
override 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.

Attributes

Definition Classes
Source
DeadlineFailureDetector.scala
override 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.

Attributes

Definition Classes
Source
DeadlineFailureDetector.scala