Search Results for

    Show / Hide Table of Contents

    Class Backoff

    Builds back-off options for creating a back-off supervisor. You can pass BackoffOptions to Props.

    Inheritance
    object
    Backoff
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Akka.Pattern
    Assembly: Akka.dll
    Syntax
    public static class Backoff

    Methods

    | Edit this page View Source

    OnFailure(Props, string, TimeSpan, TimeSpan, double)

    Back-off options for creating a back-off supervisor actor that expects a child actor to restart on failure.

    Declaration
    [Obsolete("Use the overloaded one which accepts maxNrOfRetries instead.")]
    public static BackoffOptions OnFailure(Props childProps, string childName, TimeSpan minBackoff, TimeSpan maxBackoff, double randomFactor)
    Parameters
    Type Name Description
    Props childProps

    The Props of the child actor that will be started and supervised

    string childName

    Name of the child actor

    TimeSpan minBackoff

    Minimum (initial) duration until the child actor will started again, if it is terminated

    TimeSpan maxBackoff

    The exponential back-off is capped to this duration

    double randomFactor

    After calculation of the exponential back-off an additional random delay based on this factor is added, e.g. 0.2 adds up to 20% delay. In order to skip this additional delay pass in 0.

    Returns
    Type Description
    BackoffOptions
    | Edit this page View Source

    OnFailure(Props, string, TimeSpan, TimeSpan, double, int)

    Back-off options for creating a back-off supervisor actor that expects a child actor to restart on failure.

    Declaration
    public static BackoffOptions OnFailure(Props childProps, string childName, TimeSpan minBackoff, TimeSpan maxBackoff, double randomFactor, int maxNrOfRetries)
    Parameters
    Type Name Description
    Props childProps

    The Props of the child actor that will be started and supervised

    string childName

    Name of the child actor

    TimeSpan minBackoff

    Minimum (initial) duration until the child actor will started again, if it is terminated

    TimeSpan maxBackoff

    The exponential back-off is capped to this duration

    double randomFactor

    After calculation of the exponential back-off an additional random delay based on this factor is added, e.g. 0.2 adds up to 20% delay. In order to skip this additional delay pass in 0.

    int maxNrOfRetries

    Maximum number of attempts to restart the child actor. The supervisor will terminate itself after the maxNoOfRetries is reached. In order to restart infinitely pass in -1

    Returns
    Type Description
    BackoffOptions
    | Edit this page View Source

    OnStop(Props, string, TimeSpan, TimeSpan, double)

    Back-off options for creating a back-off supervisor actor that expects a child actor to stop on failure.

    Declaration
    [Obsolete("Use the overloaded one which accepts maxNrOfRetries instead.")]
    public static BackoffOptions OnStop(Props childProps, string childName, TimeSpan minBackoff, TimeSpan maxBackoff, double randomFactor)
    Parameters
    Type Name Description
    Props childProps

    The Props of the child actor that will be started and supervised

    string childName

    Name of the child actor

    TimeSpan minBackoff

    Minimum (initial) duration until the child actor will started again, if it is terminated

    TimeSpan maxBackoff

    The exponential back-off is capped to this duration

    double randomFactor

    After calculation of the exponential back-off an additional random delay based on this factor is added, e.g. 0.2 adds up to 20% delay. In order to skip this additional delay pass in 0.

    Returns
    Type Description
    BackoffOptions
    | Edit this page View Source

    OnStop(Props, string, TimeSpan, TimeSpan, double, int)

    Back-off options for creating a back-off supervisor actor that expects a child actor to stop on failure.

    Declaration
    public static BackoffOptions OnStop(Props childProps, string childName, TimeSpan minBackoff, TimeSpan maxBackoff, double randomFactor, int maxNrOfRetries)
    Parameters
    Type Name Description
    Props childProps

    The Props of the child actor that will be started and supervised

    string childName

    Name of the child actor

    TimeSpan minBackoff

    Minimum (initial) duration until the child actor will started again, if it is terminated

    TimeSpan maxBackoff

    The exponential back-off is capped to this duration

    double randomFactor

    After calculation of the exponential back-off an additional random delay based on this factor is added, e.g. 0.2 adds up to 20% delay. In order to skip this additional delay pass in 0.

    int maxNrOfRetries

    Maximum number of attempts to restart the child actor. The supervisor will terminate itself after the maxNoOfRetries is reached. In order to restart infinitely pass in -1

    Returns
    Type Description
    BackoffOptions
    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