Package org.apache.pekko.cluster.typed
Class SingletonActor<M>
java.lang.Object
org.apache.pekko.cluster.typed.SingletonActor<M>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <M> SingletonActor<M>behavior()name()static <M> SingletonActor<M>Java APIprops()scala.Option<ClusterSingletonSettings>settings()scala.Option<M>pekko.actor.typed.Propsof the singleton actor, such as dispatcher settings.withSettings(ClusterSingletonSettings settings) Additional settings, typically loaded from configuration.withStopMessage(M msg) Message sent to the singleton to tell it to stop, e.g.
-
Constructor Details
-
SingletonActor
public SingletonActor()
-
-
Method Details
-
apply
- Parameters:
name- Unique name for the singletonbehavior- Behavior for the singleton
-
of
Java API- Parameters:
name- Unique name for the singletonbehavior- Behavior for the singleton
-
behavior
-
name
-
props
-
stopMessage
-
settings
-
withProps
pekko.actor.typed.Propsof the singleton actor, such as dispatcher settings. -
withStopMessage
Message sent to the singleton to tell it to stop, e.g. when being migrated. If this is not defined it will be stopped automatically. It can be useful to define a custom stop message if the singleton needs to perform some asynchronous cleanup or interactions before stopping. -
withSettings
Additional settings, typically loaded from configuration.
-