Package org.apache.pekko.cluster.typed
Class ClusterSingleton
java.lang.Object
org.apache.pekko.cluster.typed.ClusterSingleton
- All Implemented Interfaces:
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 -
Method Summary
Modifier and TypeMethodDescriptionstatic final Tapply(ActorSystem<?> system) static ClusterSingletoncreateExtension(ActorSystem<?> system) static final booleanstatic ClusterSingletonget(ActorSystem<?> system) Java API:static final inthashCode()static ExtensionId<T>id()abstract <M> ActorRef<M>init(SingletonActor<M> singleton) Start if needed and provide a proxy to a named singleton
-
Constructor Details
-
ClusterSingleton
public ClusterSingleton()
-
-
Method Details
-
createExtension
-
get
Java API: -
apply
-
hashCode
public static final int hashCode() -
equals
-
id
-
init
Start if needed and provide a proxy to a named singletonIf there already is a manager running for the given
singletonNameon this node, no additional manager is started. If there already is a proxy running for the givensingletonNameon this node, anpekko.actor.typed.ActorRefto that is returned.- Returns:
- A proxy actor that can be used to communicate with the singleton in the cluster
-