Search Results for

    Show / Hide Table of Contents

    Class DeadlineFailureDetector

    This class represents a FailureDetector that uses an absolute timeout of missing heartbeats to trigger unavailability.

    Inheritance
    object
    FailureDetector
    DeadlineFailureDetector
    Inherited Members
    FailureDetector.DefaultClock
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Akka.Remote
    Assembly: Akka.Remote.dll
    Syntax
    public class DeadlineFailureDetector : FailureDetector

    Constructors

    | Edit this page View Source

    DeadlineFailureDetector(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.

    note

    The configuration must define the 'akka.cluster.failure-detector.acceptable-heartbeat-pause' key.

    EventStream eventStream

    N/A. This parameter is not used.

    | Edit this page View Source

    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

    | Edit this page View Source

    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:

    • The specified acceptableHeartbeatPause is less than zero.
    • The specified heartbeatInterval is less than zero

    Properties

    | Edit this page View Source

    IsAvailable

    Determines whether the resource is considered to be up and healthy.

    Declaration
    public override bool IsAvailable { get; }
    Property Value
    Type Description
    bool
    Overrides
    FailureDetector.IsAvailable
    | Edit this page View Source

    IsMonitoring

    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
    FailureDetector.IsMonitoring

    Methods

    | Edit this page View Source

    HeartBeat()

    Notifies the failure detector that a heartbeat arrived from the monitored resource.

    Declaration
    public override void HeartBeat()
    Overrides
    FailureDetector.HeartBeat()

    Extension Methods

    ObjectExtensions.IsDefaultForType<T>(T)
    ObjectExtensions.AsOption<T>(T)
    Extensions.AsInstanceOf<T>(object)
    In this article
    • githubEdit this page
    • View Source
    Back to top
    Contribute
    • Project Chat
    • Discussion Forum
    • Source Code
    Support
    • Akka.NET Support Plans
    • Akka.NET Observability Tools
    • Akka.NET Training & Consulting
    Maintained By
    • Petabridge - The Akka.NET Company
    • Learn Akka.NET