Class ClusterReceptionist

  • All Implemented Interfaces:
    Actor, ActorLogging

    public final class ClusterReceptionist
    extends java.lang.Object
    implements Actor, ActorLogging
    Deprecated.
    Use Akka gRPC instead, see https://doc.akka.io/libraries/akka-core/2.6/cluster-client.html#migration-to-akka-grpc. Since 2.6.0.
    ClusterClient connects to this actor to retrieve. The ClusterReceptionist is supposed to be started on all nodes, or all nodes with specified role, in the cluster. The receptionist can be started with the ClusterClientReceptionist or as an ordinary actor (use the factory method props(akka.actor.ActorRef, akka.cluster.client.ClusterReceptionistSettings)).

    The receptionist forwards messages from the client to the associated DistributedPubSubMediator, i.e. the client can send messages to any actor in the cluster that is registered in the DistributedPubSubMediator. Messages from the client are wrapped in DistributedPubSubMediator.Send, DistributedPubSubMediator.SendToAll or DistributedPubSubMediator.Publish with the semantics described in DistributedPubSubMediator.

    Response messages from the destination actor are tunneled via the receptionist to avoid inbound connections from other cluster nodes to the client, i.e. the sender(), as seen by the destination actor, is not the client itself. The sender() of the response messages, as seen by the client, is deadLetters since the client should normally send subsequent messages via the ClusterClient. It is possible to pass the original sender inside the reply messages if the client is supposed to communicate directly to the actor in the cluster.

    • Method Detail

      • context

        public ActorContext context()
        Deprecated.
        Description copied from interface: Actor
        Scala API: Stores the context for this actor, including self, and sender. It is implicit to support operations such as forward.

        WARNING: Only valid within the Actor itself, so do not close over it and publish it to other threads!

        ActorContext is the Scala API. getContext returns a AbstractActor.ActorContext, which is the Java API of the actor context.

        Specified by:
        context in interface Actor
      • self

        public final ActorRef self()
        Deprecated.
        Description copied from interface: Actor
        The 'self' field holds the ActorRef for this actor.

        Can be used to send messages to itself:
         self ! message
         
        Specified by:
        self in interface Actor
      • akka$actor$Actor$_setter_$context_$eq

        protected void akka$actor$Actor$_setter_$context_$eq​(ActorContext x$1)
        Deprecated.
        Description copied from interface: Actor
        Scala API: Stores the context for this actor, including self, and sender. It is implicit to support operations such as forward.

        WARNING: Only valid within the Actor itself, so do not close over it and publish it to other threads!

        ActorContext is the Scala API. getContext returns a AbstractActor.ActorContext, which is the Java API of the actor context.

        Specified by:
        akka$actor$Actor$_setter_$context_$eq in interface Actor
      • akka$actor$Actor$_setter_$self_$eq

        protected final void akka$actor$Actor$_setter_$self_$eq​(ActorRef x$1)
        Deprecated.
        Description copied from interface: Actor
        The 'self' field holds the ActorRef for this actor.

        Can be used to send messages to itself:
         self ! message
         
        Specified by:
        akka$actor$Actor$_setter_$self_$eq in interface Actor
      • cluster

        public Cluster cluster()
        Deprecated.
      • verboseHeartbeat

        public boolean verboseHeartbeat()
        Deprecated.
      • nodes

        public scala.collection.immutable.SortedSet<Address> nodes()
        Deprecated.
      • nodes_$eq

        public void nodes_$eq​(scala.collection.immutable.SortedSet<Address> x$1)
        Deprecated.
      • virtualNodesFactor

        public int virtualNodesFactor()
        Deprecated.
      • clientsPublished

        public scala.collection.immutable.HashSet<ActorRef> clientsPublished()
        Deprecated.
      • clientsPublished_$eq

        public void clientsPublished_$eq​(scala.collection.immutable.HashSet<ActorRef> x$1)
        Deprecated.
      • subscribers

        public scala.collection.immutable.Vector<ActorRef> subscribers()
        Deprecated.
      • subscribers_$eq

        public void subscribers_$eq​(scala.collection.immutable.Vector<ActorRef> x$1)
        Deprecated.
      • checkDeadlinesTask

        public Cancellable checkDeadlinesTask()
        Deprecated.
      • preStart

        public void preStart()
        Deprecated.
        Description copied from interface: Actor
        User overridable callback.

        Is called when an Actor is started. Actors are automatically started asynchronously when created. Empty default implementation.
        Specified by:
        preStart in interface Actor
      • postStop

        public void postStop()
        Deprecated.
        Description copied from interface: Actor
        User overridable callback.

        Is called asynchronously after 'actor.stop()' is invoked. Empty default implementation.
        Specified by:
        postStop in interface Actor
      • matchingRole

        public boolean matchingRole​(Member m)
        Deprecated.
      • responseTunnel

        public ActorRef responseTunnel​(ActorRef client)
        Deprecated.
      • receive

        public scala.PartialFunction<java.lang.Object,​scala.runtime.BoxedUnit> receive()
        Deprecated.
        Description copied from interface: Actor
        Scala API: This defines the initial actor behavior, it must return a partial function with the actor logic.
        Specified by:
        receive in interface Actor
      • updateClientInteractions

        public void updateClientInteractions​(ActorRef client)
        Deprecated.
      • publishClientsUnreachable

        public void publishClientsUnreachable()
        Deprecated.