Class ClusterSingleton

java.lang.Object
org.apache.pekko.cluster.typed.ClusterSingleton
All Implemented Interfaces:
Extension

public abstract class ClusterSingleton extends 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 Details

    • ClusterSingleton

      public ClusterSingleton()
  • Method Details

    • createExtension

      public static ClusterSingleton createExtension(ActorSystem<?> system)
    • get

      public static ClusterSingleton 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(Object other)
    • id

      public static ExtensionId<T> id()
    • init

      public abstract <M> ActorRef<M> init(SingletonActor<M> singleton)
      Start if needed and provide a proxy to a named singleton

      If there already is a manager running for the given singletonName on this node, no additional manager is started. If there already is a proxy running for the given singletonName on this node, an pekko.actor.typed.ActorRef to that is returned.

      Returns:
      A proxy actor that can be used to communicate with the singleton in the cluster