Package akka.cluster.typed
Class Cluster
- java.lang.Object
-
- akka.cluster.typed.Cluster
-
- All Implemented Interfaces:
Extension
- Direct Known Subclasses:
AdapterClusterImpl
public abstract class Cluster extends java.lang.Object implements Extension
This class is not intended for user extension other than for test purposes (e.g. stub implementation). More methods may be added in the future and that may break such implementations.
-
-
Constructor Summary
Constructors Constructor Description Cluster()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static T
apply(ActorSystem<?> system)
static Cluster
createExtension(ActorSystem<?> system)
static boolean
equals(java.lang.Object other)
static Cluster
get(ActorSystem<?> system)
Java APIstatic int
hashCode()
static ExtensionId<T>
id()
abstract boolean
isTerminated()
Returns true if this cluster instance has be shutdown.abstract ActorRef<ClusterCommand>
manager()
abstract Member
selfMember()
Details about this cluster node itselfabstract ClusterEvent.CurrentClusterState
state()
Current snapshot state of the cluster.abstract ActorRef<ClusterStateSubscription>
subscriptions()
-
-
-
Method Detail
-
createExtension
public static Cluster createExtension(ActorSystem<?> system)
-
get
public static Cluster get(ActorSystem<?> system)
Java API
-
apply
public static final T apply(ActorSystem<?> system)
-
hashCode
public static final int hashCode()
-
equals
public static final boolean equals(java.lang.Object other)
-
id
public static ExtensionId<T> id()
-
selfMember
public abstract Member selfMember()
Details about this cluster node itself
-
isTerminated
public abstract boolean isTerminated()
Returns true if this cluster instance has be shutdown.
-
state
public abstract ClusterEvent.CurrentClusterState state()
Current snapshot state of the cluster.
-
subscriptions
public abstract ActorRef<ClusterStateSubscription> subscriptions()
- Returns:
- an actor that allows for subscribing to messages when the cluster state changes
-
manager
public abstract ActorRef<ClusterCommand> manager()
- Returns:
- an actor that accepts commands to join, leave and down nodes in a cluster
-
-