Class ClusterReceptionist
- All Implemented Interfaces:
Actor,ActorLogging
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(org.apache.pekko.actor.ActorRef, org.apache.pekko.cluster.client.ClusterReceptionistSettings)).
The receptionist forwards messages from the client to the associated pekko.cluster.pubsub.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
pekko.cluster.pubsub.DistributedPubSubMediator.Send, pekko.cluster.pubsub.DistributedPubSubMediator.SendToAll
or pekko.cluster.pubsub.DistributedPubSubMediator.Publish with the semantics described in
pekko.cluster.pubsub.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.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classDeprecated.INTERNAL APINested classes/interfaces inherited from interface org.apache.pekko.actor.Actor
Actor.emptyBehavior$, Actor.ignoringBehavior$ -
Constructor Summary
ConstructorsConstructorDescriptionClusterReceptionist(ActorRef pubSubMediator, ClusterReceptionistSettings settings) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionDeprecated.scala.collection.immutable.HashMap<ActorRef,DeadlineFailureDetector> Deprecated.voidclientInteractions_$eq(scala.collection.immutable.HashMap<ActorRef, DeadlineFailureDetector> x$1) Deprecated.scala.collection.immutable.HashSet<ActorRef>Deprecated.voidclientsPublished_$eq(scala.collection.immutable.HashSet<ActorRef> x$1) Deprecated.cluster()Deprecated.Deprecated.voidDeprecated.context()Deprecated.Scala API: Stores the context for this actor, including self, and sender.booleanDeprecated.scala.collection.immutable.SortedSet<Address>nodes()Deprecated.voidDeprecated.protected voidDeprecated.Scala API: Stores the context for this actor, including self, and sender.protected final voidDeprecated.The 'self' field holds the ActorRef for this actor.voidpostStop()Deprecated.User overridable callback.voidpreStart()Deprecated.User overridable callback.static Propsprops(ActorRef pubSubMediator, ClusterReceptionistSettings settings) Deprecated.Scala API: Factory method forClusterReceptionistpekko.actor.Props.voidDeprecated.scala.PartialFunction<Object,scala.runtime.BoxedUnit> receive()Deprecated.Scala API: This defines the initial actor behavior, it must return a partial function with the actor logic.responseTunnel(ActorRef client) Deprecated.final ActorRefself()Deprecated.The 'self' field holds the ActorRef for this actor.scala.collection.immutable.Vector<ActorRef>Deprecated.voidsubscribers_$eq(scala.collection.immutable.Vector<ActorRef> x$1) Deprecated.voidupdateClientInteractions(ActorRef client) Deprecated.booleanDeprecated.intDeprecated.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.pekko.actor.Actor
aroundPostRestart, aroundPostStop, aroundPreRestart, aroundPreStart, aroundReceive, postRestart, preRestart, sender, supervisorStrategy, unhandledMethods inherited from interface org.apache.pekko.actor.ActorLogging
_log_$eq, log
-
Constructor Details
-
ClusterReceptionist
Deprecated.
-
-
Method Details
-
props
Deprecated.Scala API: Factory method forClusterReceptionistpekko.actor.Props. -
context
Deprecated.Description copied from interface:ActorScala API: Stores the context for this actor, including self, and sender. It is implicit to support operations such asforward.WARNING: Only valid within the Actor itself, so do not close over it and publish it to other threads!
pekko.actor.ActorContextis the Scala API.getContextreturns apekko.actor.AbstractActor.ActorContext, which is the Java API of the actor context. -
self
Deprecated.Description copied from interface:ActorThe 'self' field holds the ActorRef for this actor. Can be used to send messages to itself:self ! message
-
org$apache$pekko$actor$Actor$_setter_$context_$eq
Deprecated.Description copied from interface:ActorScala API: Stores the context for this actor, including self, and sender. It is implicit to support operations such asforward.WARNING: Only valid within the Actor itself, so do not close over it and publish it to other threads!
pekko.actor.ActorContextis the Scala API.getContextreturns apekko.actor.AbstractActor.ActorContext, which is the Java API of the actor context.- Specified by:
org$apache$pekko$actor$Actor$_setter_$context_$eqin interfaceActor
-
org$apache$pekko$actor$Actor$_setter_$self_$eq
Deprecated.Description copied from interface:ActorThe 'self' field holds the ActorRef for this actor. Can be used to send messages to itself:self ! message
- Specified by:
org$apache$pekko$actor$Actor$_setter_$self_$eqin interfaceActor
-
cluster
Deprecated. -
verboseHeartbeat
public boolean verboseHeartbeat()Deprecated. -
nodes
Deprecated. -
nodes_$eq
Deprecated. -
virtualNodesFactor
public int virtualNodesFactor()Deprecated. -
consistentHash
Deprecated. -
consistentHash_$eq
Deprecated. -
clientInteractions
Deprecated. -
clientInteractions_$eq
public void clientInteractions_$eq(scala.collection.immutable.HashMap<ActorRef, DeadlineFailureDetector> x$1) Deprecated. -
clientsPublished
Deprecated. -
clientsPublished_$eq
Deprecated. -
subscribers
Deprecated. -
subscribers_$eq
Deprecated. -
checkDeadlinesTask
Deprecated. -
preStart
public void preStart()Deprecated.Description copied from interface:ActorUser overridable callback. Is called when an Actor is started. Actors are automatically started asynchronously when created. Empty default implementation. -
postStop
public void postStop()Deprecated.Description copied from interface:ActorUser overridable callback. Is called asynchronously after 'actor.stop()' is invoked. Empty default implementation. -
matchingRole
Deprecated. -
responseTunnel
Deprecated. -
receive
Deprecated.Description copied from interface:ActorScala API: This defines the initial actor behavior, it must return a partial function with the actor logic. -
updateClientInteractions
Deprecated. -
publishClientsUnreachable
public void publishClientsUnreachable()Deprecated.
-