Class ClusterSingletonProxySettings
Create settings from the default configuration
akka.cluster.singleton-proxy
.
Implements
Inherited Members
Namespace: Akka.Cluster.Tools.Singleton
Assembly: Akka.Cluster.Tools.dll
Syntax
public sealed class ClusterSingletonProxySettings : INoSerializationVerificationNeeded
Constructors
| Improve this Doc View SourceClusterSingletonProxySettings(String, String, TimeSpan, Int32, Boolean)
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. |
Int32 | 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. |
Boolean | 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 |
ArgumentNullException |
ClusterSingletonProxySettings(String, String, TimeSpan, Int32, Boolean, Boolean, 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. |
Int32 | 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. |
Boolean | 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. |
Boolean | 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 |
ArgumentNullException |
Properties
| Improve this Doc View SourceBufferSize
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 |
---|---|
Int32 |
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 |
---|---|
Boolean |
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 |
---|---|
Boolean |
Role
The role of the cluster nodes where the singleton can be deployed.
Declaration
public string Role { get; }
Property Value
Type | Description |
---|---|
String |
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 |
SingletonIdentificationInterval
Interval at which the proxy will try to resolve the singleton instance.
Declaration
public TimeSpan SingletonIdentificationInterval { get; }
Property Value
Type | Description |
---|---|
TimeSpan |
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
| Improve this Doc View SourceCreate(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 |
Create(Config, Boolean)
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 |
Boolean | considerAppVersion | TBD |
Returns
Type | Description |
---|---|
ClusterSingletonProxySettings | TBD |
WithBufferSize(Int32)
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 |
---|---|---|
Int32 | bufferSize | The buffer size of the singleton proxy. |
Returns
Type | Description |
---|---|
ClusterSingletonProxySettings | A new setting with the provided |
WithLogSingletonIdentificationFailure(Boolean)
Declaration
public ClusterSingletonProxySettings WithLogSingletonIdentificationFailure(bool logSingletonIdentificationFailure)
Parameters
Type | Name | Description |
---|---|---|
Boolean | logSingletonIdentificationFailure |
Returns
Type | Description |
---|---|
ClusterSingletonProxySettings |
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 |
WithSingletonIdentificationFailureDuration(TimeSpan)
Declaration
public ClusterSingletonProxySettings WithSingletonIdentificationFailureDuration(TimeSpan singletonIdentificationFailurePeriod)
Parameters
Type | Name | Description |
---|---|---|
TimeSpan | singletonIdentificationFailurePeriod |
Returns
Type | Description |
---|---|
ClusterSingletonProxySettings |
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 |
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 |