Class ClusterSingletonProxy
The ClusterSingletonProxy works together with the ClusterSingletonManager to provide a distributed proxy to the singleton actor.
The proxy can be started on every node where the singleton needs to be reached and used as if it were the singleton itself. It will then act as a router to the currently running singleton instance. If the singleton is not currently available, e.g., during hand off or startup, the proxy will buffer the messages sent to the singleton and then deliver them when the singleton is finally available. The size of the buffer is configurable and it can be disabled by using a buffer size of 0. When the buffer is full old messages will be dropped when new messages are sent via the proxy.
The proxy works by keeping track of the oldest cluster member. When a new oldest member is identified, e.g. because the older one left the cluster, or at startup, the proxy will try to identify the singleton on the oldest member by periodically sending an Identify message until the singleton responds with its ActorIdentity.
Inherited Members
Namespace: Akka.Cluster.Tools.Singleton
Assembly: Akka.Cluster.Tools.dll
Syntax
public sealed class ClusterSingletonProxy : ReceiveActor, IInternalActor, IInitializableActor, IWithTimers
Constructors
| Edit this page View SourceClusterSingletonProxy(string, ClusterSingletonProxySettings)
TBD
Declaration
public ClusterSingletonProxy(string singletonManagerPath, ClusterSingletonProxySettings settings)
Parameters
Type | Name | Description |
---|---|---|
string | singletonManagerPath | TBD |
ClusterSingletonProxySettings | settings | TBD |
Properties
| Edit this page View SourceTimers
Gets or sets the TimerScheduler. This will be automatically populated by the framework in base constructor. Implement this as an auto property.
Declaration
public ITimerScheduler Timers { get; set; }
Property Value
Type | Description |
---|---|
ITimerScheduler |
Methods
| Edit this page View SourceDefaultConfig()
Returns default HOCON configuration for the cluster singleton.
Declaration
public static Config DefaultConfig()
Returns
Type | Description |
---|---|
Config | TBD |
PostStop()
TBD
Declaration
protected override void PostStop()
Overrides
| Edit this page View SourcePreStart()
TBD
Declaration
protected override void PreStart()
Overrides
| Edit this page View SourceProps(string, ClusterSingletonProxySettings)
Factory method for ClusterSingletonProxy Props.
Declaration
public static Props Props(string singletonManagerPath, ClusterSingletonProxySettings settings)
Parameters
Type | Name | Description |
---|---|---|
string | singletonManagerPath | The logical path of the singleton manager, e.g. |
ClusterSingletonProxySettings | settings | Cluster singleton proxy settings. |
Returns
Type | Description |
---|---|
Props | TBD |