Class ClusterSingleton

  • All Implemented Interfaces:
    Extension
    Direct Known Subclasses:
    AdaptedClusterSingletonImpl

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

      • ClusterSingleton

        public ClusterSingleton()
    • Method Detail

      • get

        public static ClusterSingleton get​(ActorSystem<?> system)
        Java API:
        Parameters:
        system - (undocumented)
        Returns:
        (undocumented)
      • 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 ActorRef to that is returned.

        Parameters:
        singleton - (undocumented)
        Returns:
        A proxy actor that can be used to communicate with the singleton in the cluster