Cluster Class |
This class represents an ActorSystem extension used to create, monitor and manage a cluster of member nodes hosted within the actor system.
Each cluster Member is identified by its Address and the cluster address of this actor system is SelfAddress. A member also has a status; initially Joining followed by Up.
Namespace: Akka.Cluster
The Cluster type exposes the following members.
Name | Description | |
---|---|---|
DowningProvider |
TBD
| |
FailureDetector |
The set of failure detectors used for monitoring one or more nodes in the cluster.
| |
IsTerminated |
Determine whether or not this cluster instance has been shutdown.
| |
SelfAddress |
The address of this cluster member.
| |
SelfRoles |
The roles that this cluster member is currently a part.
| |
SelfUniqueAddress |
The current unique address for the cluster, which includes the UID.
| |
Settings |
The settings for the cluster.
| |
State |
The current snapshot state of the cluster.
| |
System |
The underlying ActorSystem supported by this plugin.
|
Name | Description | |
---|---|---|
Down |
Sends a command to DOWN the node specified by address.
When a member is considered by the failure detector to be unreachable the leader is not
allowed to perform its duties, such as changing status of new joining members to Up.
The status of the unreachable member must be changed to Down, which can be done with
this method.
| |
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
Get |
Retrieves the extension from the specified actor system.
| |
GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
Join |
Try to join this cluster node specified by address.
A Join(Address) command is sent to the node to join.
An actor system can only join a cluster once. Additional attempts will be ignored.
When it has successfully joined it must be restarted to be able to join another
cluster or to join the same cluster again.
| |
JoinSeedNodes |
Joins the specified seed nodes without defining them in config.
Especially useful from tests when Addresses are unknown before startup time.
An actor system can only join a cluster once. Additional attempts will be ignored.
When it has successfully joined it must be restarted to be able to join another
cluster or to join the same cluster again.
| |
Leave |
Sends a command to issue state transition to LEAVING for the node specified by address.
The member will go through the status changes Leaving (not published to
subscribers) followed by Exiting and finally Removed.
Note that this command can be issued to any member in the cluster, not necessarily the
one that is leaving. The cluster extension, but not the actor system, of the leaving member will be shutdown after
the leader has changed status of the member to Exiting. Thereafter the member will be
removed from the cluster. Normally this is handled automatically, but in case of network failures during
this process it might still be necessary to set the node's status to Down in order
to complete the removal.
| |
LeaveAsync |
Causes the CURRENT node, i.e. the one calling this function, to leave the cluster.
Once the returned Task completes, it means that the member has successfully been removed
from the cluster.
| |
LeaveAsync(CancellationToken) |
Causes the CURRENT node, i.e. the one calling this function, to leave the cluster.
Once the returned Task completes in completed or cancelled state, it means that the member has successfully been removed
from the cluster or cancellation token cancelled the task.
| |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
RegisterOnMemberRemoved |
Registers the supplied callback to run once when the current cluster member is Removed.
Typically used in combination with Leave(Address) and Terminate.
| |
RegisterOnMemberUp |
Registers the supplied callback to run once when the current cluster member is Up.
Typically used together with configuration option 'akka.cluster.min-nr-of-members' to defer some action,
such as starting actors, until the cluster has reached a certain size.
| |
RemotePathOf |
Generates the remote actor path by replacing the Address in the RootActorPath for the given
ActorRef with the cluster's SelfAddress, unless address' host is already defined
| |
SendCurrentClusterState |
Sends the current (full) state of the cluster to the specified actor.
If you want this to happen periodically, you can use the Scheduler to schedule
a call to this method. You can also call State directly for this information.
| |
Subscribe(IActorRef, Type) |
Subscribe to one or more cluster domain events.
| |
Subscribe(IActorRef, ClusterEventSubscriptionInitialStateMode, Type) |
Subscribe to one or more cluster domain events.
| |
ToString | Returns a string that represents the current object. (Inherited from Object.) | |
Unsubscribe(IActorRef) |
Stops the specific actor from receiving all types of cluster domain events.
| |
Unsubscribe(IActorRef, Type) |
Stops the specific actor from receiving a specific type of cluster domain event.
|
Name | Description | |
---|---|---|
AsInstanceOfT |
TBD
(Defined by Extensions.) | |
GCounter | Overloaded.
Creates a new instance of GCounter, that works within the scope of the current cluster.
(Defined by ClusterReplicatedDataExtensions.) | |
GCounter(GCounter) | Overloaded.
Creates an instance of GCounter scoped to a current cluster.
(Defined by ClusterReplicatedDataExtensions.) | |
LWWDictionaryTKey, TVal | Overloaded.
Creates a new instance of an LWWDictionary scoped to a current cluster.
(Defined by ClusterReplicatedDataExtensions.) | |
LWWDictionaryTKey, TVal(LWWDictionaryTKey, TVal) | Overloaded.
Creates an instance of an LWWDictionary scoped to a current cluster.
(Defined by ClusterReplicatedDataExtensions.) | |
LWWRegisterTVal |
Creates an instance of an LWWRegister scoped to a current cluster.
(Defined by ClusterReplicatedDataExtensions.) | |
Match | Overloaded.
Matches the specified target.
(Defined by PatternMatch.) | |
MatchT | Overloaded.
Matches the specified target and return a result of target processing.
(Defined by PatternMatch.) | |
ORDictionaryTKey, TVal | Overloaded.
Creates a new instance of an ORDictionary scoped to a current cluster.
(Defined by ClusterReplicatedDataExtensions.) | |
ORDictionaryTKey, TVal(ORDictionaryTKey, TVal) | Overloaded.
Creates an instance of an ORDictionary scoped to a current cluster.
(Defined by ClusterReplicatedDataExtensions.) | |
ORMultiDictionaryTKey, TVal | Overloaded.
Creates a new instance of an ORMultiDictionary scoped to a current cluster.
(Defined by ClusterReplicatedDataExtensions.) | |
ORMultiDictionaryTKey, TVal(ORMultiDictionaryTKey, TVal) | Overloaded.
Creates an instance of an ORMultiDictionary scoped to a current cluster.
(Defined by ClusterReplicatedDataExtensions.) | |
ORSetT | Overloaded.
Creates a new instance of LocalORSetT, that works within the scope of the current cluster.
(Defined by ClusterReplicatedDataExtensions.) | |
ORSetT(ORSetT) | Overloaded.
Creates an instance of an ORSet scoped to a current cluster.
(Defined by ClusterReplicatedDataExtensions.) | |
PNCounter | Overloaded.
Creates a new instance of PNCounter, that works within the scope of the current cluster.
(Defined by ClusterReplicatedDataExtensions.) | |
PNCounter(PNCounter) | Overloaded.
Creates an instance of PNCounter scoped to a current cluster.
(Defined by ClusterReplicatedDataExtensions.) | |
PNCounterDictionaryTKey | Overloaded.
Creates a new instance of an PNCounterDictionary scoped to a current cluster.
(Defined by ClusterReplicatedDataExtensions.) | |
PNCounterDictionaryTKey(PNCounterDictionaryTKey) | Overloaded.
Creates an instance of an PNCounterDictionary scoped to a current cluster.
(Defined by ClusterReplicatedDataExtensions.) |