Class DeadlineFailureDetector
This class represents a FailureDetector that uses an absolute timeout of missing heartbeats to trigger unavailability.
Inherited Members
Namespace: Akka.Remote
Assembly: Akka.Remote.dll
Syntax
public class DeadlineFailureDetector : FailureDetector
Constructors
| Edit this page View SourceDeadlineFailureDetector(Config, EventStream)
Initializes a new instance of the DeadlineFailureDetector class.
Declaration
public DeadlineFailureDetector(Config config, EventStream eventStream)
Parameters
Type | Name | Description |
---|---|---|
Config | config | The configuration used to configure this failure detector. noteThe configuration must define the 'akka.cluster.failure-detector.acceptable-heartbeat-pause' key. |
EventStream | eventStream | N/A. This parameter is not used. |
DeadlineFailureDetector(TimeSpan, Clock)
Obsolete. Use DeadlineFailureDetector(TimeSpan, TimeSpan, Clock) instead.
Declaration
[Obsolete("Use DeadlineFailureDetector(acceptableHeartbeatPause, heartbeatInterval, clock) instead. [1.1.2]")]
public DeadlineFailureDetector(TimeSpan acceptableHeartbeatPause, Clock clock = null)
Parameters
Type | Name | Description |
---|---|---|
TimeSpan | acceptableHeartbeatPause | N/A |
Clock | clock | N/A |
DeadlineFailureDetector(TimeSpan, TimeSpan, Clock)
Initializes a new instance of the DeadlineFailureDetector class.
Declaration
public DeadlineFailureDetector(TimeSpan acceptableHeartbeatPause, TimeSpan heartbeatInterval, Clock clock = null)
Parameters
Type | Name | Description |
---|---|---|
TimeSpan | acceptableHeartbeatPause | Duration corresponding to number of potentially lost/delayed heartbeats that will be accepted before considering it to be an anomaly. This margin is important to be able to survive sudden, occasional, pauses in heartbeat arrivals, due to for example garbage collect or network drop. |
TimeSpan | heartbeatInterval | The amount of time between heartbeats |
Clock | clock | The clock, returning current time in milliseconds, but can be faked for testing purposes. It is only used for measuring intervals (duration). |
Exceptions
Type | Condition |
---|---|
ArgumentOutOfRangeException | This exception is thrown for the following reasons:
|
Properties
| Edit this page View SourceIsAvailable
Determines whether the resource is considered to be up and healthy.
Declaration
public override bool IsAvailable { get; }
Property Value
Type | Description |
---|---|
bool |
Overrides
| Edit this page View SourceIsMonitoring
Determines whether the failure detector has received any heartbeats or has started monitoring the resource.
Declaration
public override bool IsMonitoring { get; }
Property Value
Type | Description |
---|---|
bool |
Overrides
Methods
| Edit this page View SourceHeartBeat()
Notifies the failure detector that a heartbeat arrived from the monitored resource.
Declaration
public override void HeartBeat()