Search Results for

    Show / Hide Table of Contents

    Class ClusterSingletonProxySettings

    Create settings from the default configuration akka.cluster.singleton-proxy.

    Inheritance
    object
    ClusterSingletonProxySettings
    Implements
    INoSerializationVerificationNeeded
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Akka.Cluster.Tools.Singleton
    Assembly: Akka.Cluster.Tools.dll
    Syntax
    public sealed class ClusterSingletonProxySettings : INoSerializationVerificationNeeded

    Constructors

    | Edit this page View Source

    ClusterSingletonProxySettings(string, string, TimeSpan, int, bool)

    Creates new instance of the ClusterSingletonProxySettings.

    Declaration
    [Obsolete("Use constructor with logSingletonIdentificationFailure and logSingletonIdentificationInterval parameter instead. Since v1.5.30")]
    public ClusterSingletonProxySettings(string singletonName, string role, TimeSpan singletonIdentificationInterval, int bufferSize, bool considerAppVersion)
    Parameters
    Type Name Description
    string singletonName

    The actor name of the singleton actor that is started by the ClusterSingletonManager.

    string role

    The role of the cluster nodes where the singleton can be deployed. If None, then any node will do.

    TimeSpan singletonIdentificationInterval

    Interval at which the proxy will try to resolve the singleton instance.

    int bufferSize

    If the location of the singleton is unknown the proxy will buffer this number of messages and deliver them when the singleton is identified.When the buffer is full old messages will be dropped when new messages are sent via the proxy. Use 0 to disable buffering, i.e.messages will be dropped immediately if the location of the singleton is unknown.

    bool considerAppVersion

    Should AppVersion be considered when the cluster singleton instance is being moved to another node. When set to false, singleton instance will always be created on oldest member. When set to true, singleton instance will be created on the oldest member with the highest AppVersion number.

    Exceptions
    Type Condition
    ArgumentException

    This exception is thrown when either the specified singletonIdentificationInterval or bufferSize is less than or equal to zero.

    ArgumentNullException
    | Edit this page View Source

    ClusterSingletonProxySettings(string, string, TimeSpan, int, bool, bool, TimeSpan)

    Creates new instance of the ClusterSingletonProxySettings.

    Declaration
    public ClusterSingletonProxySettings(string singletonName, string role, TimeSpan singletonIdentificationInterval, int bufferSize, bool considerAppVersion, bool logSingletonIdentificationFailure, TimeSpan singletonIdentificationFailurePeriod)
    Parameters
    Type Name Description
    string singletonName

    The actor name of the singleton actor that is started by the ClusterSingletonManager.

    string role

    The role of the cluster nodes where the singleton can be deployed. If None, then any node will do.

    TimeSpan singletonIdentificationInterval

    Interval at which the proxy will try to resolve the singleton instance.

    int bufferSize

    If the location of the singleton is unknown the proxy will buffer this number of messages and deliver them when the singleton is identified.When the buffer is full old messages will be dropped when new messages are sent via the proxy. Use 0 to disable buffering, i.e.messages will be dropped immediately if the location of the singleton is unknown.

    bool considerAppVersion

    Should AppVersion be considered when the cluster singleton instance is being moved to another node. When set to false, singleton instance will always be created on oldest member. When set to true, singleton instance will be created on the oldest member with the highest AppVersion number.

    bool logSingletonIdentificationFailure

    Should the singleton proxy log a warning if no singleton actor were found after a period of time

    TimeSpan singletonIdentificationFailurePeriod

    The period the proxy will wait until it logs a missing singleton warning, defaults to 1 minute

    Exceptions
    Type Condition
    ArgumentException

    This exception is thrown when either the specified singletonIdentificationInterval or bufferSize is less than or equal to zero.

    ArgumentNullException

    Properties

    | Edit this page View Source

    BufferSize

    If the location of the singleton is unknown the proxy will buffer this number of messages and deliver them when the singleton is identified.

    Declaration
    public int BufferSize { get; }
    Property Value
    Type Description
    int
    | Edit this page View Source

    ConsiderAppVersion

    Should AppVersion be considered when the cluster singleton instance is being moved to another node. When set to false, singleton instance will always be created on oldest member. When set to true, singleton instance will be created on the oldest member with the highest AppVersion number.

    Declaration
    public bool ConsiderAppVersion { get; }
    Property Value
    Type Description
    bool
    | Edit this page View Source

    LogSingletonIdentificationFailure

    Should the singleton proxy publish a warning if no singleton actor were found after a period of time

    Declaration
    public bool LogSingletonIdentificationFailure { get; }
    Property Value
    Type Description
    bool
    | Edit this page View Source

    Role

    The role of the cluster nodes where the singleton can be deployed.

    Declaration
    public string Role { get; }
    Property Value
    Type Description
    string
    | Edit this page View Source

    SingletonIdentificationFailurePeriod

    The period the proxy will wait until it logs a missing singleton warning, defaults to 1 minute

    Declaration
    public TimeSpan SingletonIdentificationFailurePeriod { get; }
    Property Value
    Type Description
    TimeSpan
    | Edit this page View Source

    SingletonIdentificationInterval

    Interval at which the proxy will try to resolve the singleton instance.

    Declaration
    public TimeSpan SingletonIdentificationInterval { get; }
    Property Value
    Type Description
    TimeSpan
    | Edit this page View Source

    SingletonName

    The actor name of the singleton actor that is started by the ClusterSingletonManager.

    Declaration
    public string SingletonName { get; }
    Property Value
    Type Description
    string

    Methods

    | Edit this page View Source

    Create(ActorSystem)

    TBD

    Declaration
    public static ClusterSingletonProxySettings Create(ActorSystem system)
    Parameters
    Type Name Description
    ActorSystem system

    TBD

    Returns
    Type Description
    ClusterSingletonProxySettings

    TBD

    Exceptions
    Type Condition
    ConfigurationException

    TBD

    | Edit this page View Source

    Create(Config, bool)

    Create settings from a configuration with the same layout as the default configuration akka.cluster.singleton-proxy.

    Declaration
    public static ClusterSingletonProxySettings Create(Config config, bool considerAppVersion)
    Parameters
    Type Name Description
    Config config

    TBD

    bool considerAppVersion

    TBD

    Returns
    Type Description
    ClusterSingletonProxySettings

    TBD

    | Edit this page View Source

    WithBufferSize(int)

    Creates a new ClusterSingletonProxySettings setting with the specified bufferSize.

    note

    This method is immutable and returns a new instance of the setting.

    Declaration
    public ClusterSingletonProxySettings WithBufferSize(int bufferSize)
    Parameters
    Type Name Description
    int bufferSize

    The buffer size of the singleton proxy.

    Returns
    Type Description
    ClusterSingletonProxySettings

    A new setting with the provided bufferSize.

    | Edit this page View Source

    WithLogSingletonIdentificationFailure(bool)

    Declaration
    public ClusterSingletonProxySettings WithLogSingletonIdentificationFailure(bool logSingletonIdentificationFailure)
    Parameters
    Type Name Description
    bool logSingletonIdentificationFailure
    Returns
    Type Description
    ClusterSingletonProxySettings
    | Edit this page View Source

    WithRole(string)

    Creates a new ClusterSingletonProxySettings setting with the specified role from the akka.cluster.role in the configuration used. The role specifies the nodes on which the targeted singleton can run.

    note

    This method is immutable and returns a new instance of the setting.

    Declaration
    public ClusterSingletonProxySettings WithRole(string role)
    Parameters
    Type Name Description
    string role

    The role of the singleton proxy.

    Returns
    Type Description
    ClusterSingletonProxySettings

    A new setting with the provided role.

    | Edit this page View Source

    WithSingletonIdentificationFailureDuration(TimeSpan)

    Declaration
    public ClusterSingletonProxySettings WithSingletonIdentificationFailureDuration(TimeSpan singletonIdentificationFailurePeriod)
    Parameters
    Type Name Description
    TimeSpan singletonIdentificationFailurePeriod
    Returns
    Type Description
    ClusterSingletonProxySettings
    | Edit this page View Source

    WithSingletonIdentificationInterval(TimeSpan)

    Creates a new ClusterSingletonProxySettings setting with the specified singletonIdentificationInterval.

    note

    This method is immutable and returns a new instance of the setting.

    Declaration
    public ClusterSingletonProxySettings WithSingletonIdentificationInterval(TimeSpan singletonIdentificationInterval)
    Parameters
    Type Name Description
    TimeSpan singletonIdentificationInterval

    The identification level of the singleton proxy.

    Returns
    Type Description
    ClusterSingletonProxySettings

    A new setting with the provided singletonIdentificationInterval.

    | Edit this page View Source

    WithSingletonName(string)

    Creates a new ClusterSingletonProxySettings setting with the specified singletonName.

    note

    This method is immutable and returns a new instance of the setting.

    Declaration
    public ClusterSingletonProxySettings WithSingletonName(string singletonName)
    Parameters
    Type Name Description
    string singletonName

    The name of the singleton actor used by the ClusterSingletonManager.

    Returns
    Type Description
    ClusterSingletonProxySettings

    A new setting with the provided singletonName.

    Implements

    INoSerializationVerificationNeeded

    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