Class ClusterReceptionist
- java.lang.Object
-
- org.apache.pekko.cluster.client.ClusterReceptionist
-
- All Implemented Interfaces:
Actor,ActorLogging
public final class ClusterReceptionist extends java.lang.Object implements Actor, ActorLogging
Deprecated.Use Apache Pekko gRPC instead, see https://pekko.apache.org/docs/pekko/current/cluster-client.html#migration-to-pekko-grpc. Since Akka 2.6.0.ClusterClientconnects to this actor to retrieve. TheClusterReceptionistis supposed to be started on all nodes, or all nodes with specified role, in the cluster. The receptionist can be started with theClusterClientReceptionistor as an ordinary actor (use the factory methodprops(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 theDistributedPubSubMediator. Messages from the client are wrapped inpekko.cluster.pubsub.DistributedPubSubMediator.Send,pekko.cluster.pubsub.DistributedPubSubMediator.SendToAllorpekko.cluster.pubsub.DistributedPubSubMediator.Publishwith the semantics described inpekko.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. Thesender()of the response messages, as seen by the client, isdeadLetterssince the client should normally send subsequent messages via theClusterClient. 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 Classes Modifier and Type Class Description static classClusterReceptionist.Internal$Deprecated.INTERNAL API-
Nested classes/interfaces inherited from interface org.apache.pekko.actor.Actor
Actor.emptyBehavior$, Actor.ignoringBehavior$
-
-
Constructor Summary
Constructors Constructor Description ClusterReceptionist(ActorRef pubSubMediator, ClusterReceptionistSettings settings)Deprecated.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description CancellablecheckDeadlinesTask()Deprecated.scala.collection.immutable.HashMap<ActorRef,DeadlineFailureDetector>clientInteractions()Deprecated.voidclientInteractions_$eq(scala.collection.immutable.HashMap<ActorRef,DeadlineFailureDetector> x$1)Deprecated.scala.collection.immutable.HashSet<ActorRef>clientsPublished()Deprecated.voidclientsPublished_$eq(scala.collection.immutable.HashSet<ActorRef> x$1)Deprecated.Clustercluster()Deprecated.ConsistentHash<Address>consistentHash()Deprecated.voidconsistentHash_$eq(ConsistentHash<Address> x$1)Deprecated.ActorContextcontext()Deprecated.Scala API: Stores the context for this actor, including self, and sender.booleanmatchingRole(Member m)Deprecated.scala.collection.immutable.SortedSet<Address>nodes()Deprecated.voidnodes_$eq(scala.collection.immutable.SortedSet<Address> x$1)Deprecated.protected voidorg$apache$pekko$actor$Actor$_setter_$context_$eq(ActorContext x$1)Deprecated.Scala API: Stores the context for this actor, including self, and sender.protected voidorg$apache$pekko$actor$Actor$_setter_$self_$eq(ActorRef x$1)Deprecated.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.voidpublishClientsUnreachable()Deprecated.scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit>receive()Deprecated.Scala API: This defines the initial actor behavior, it must return a partial function with the actor logic.ActorRefresponseTunnel(ActorRef client)Deprecated.ActorRefself()Deprecated.The 'self' field holds the ActorRef for this actor.scala.collection.immutable.Vector<ActorRef>subscribers()Deprecated.voidsubscribers_$eq(scala.collection.immutable.Vector<ActorRef> x$1)Deprecated.voidupdateClientInteractions(ActorRef client)Deprecated.booleanverboseHeartbeat()Deprecated.intvirtualNodesFactor()Deprecated.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.pekko.actor.Actor
aroundPostRestart, aroundPostStop, aroundPreRestart, aroundPreStart, aroundReceive, postRestart, preRestart, sender, supervisorStrategy, unhandled
-
Methods inherited from interface org.apache.pekko.actor.ActorLogging
_log_$eq, log
-
-
-
-
Constructor Detail
-
ClusterReceptionist
public ClusterReceptionist(ActorRef pubSubMediator, ClusterReceptionistSettings settings)
Deprecated.
-
-
Method Detail
-
props
public static Props props(ActorRef pubSubMediator, ClusterReceptionistSettings settings)
Deprecated.Scala API: Factory method forClusterReceptionistpekko.actor.Props.
-
context
public ActorContext 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
public final ActorRef 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
protected void org$apache$pekko$actor$Actor$_setter_$context_$eq(ActorContext x$1)
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
protected final void org$apache$pekko$actor$Actor$_setter_$self_$eq(ActorRef x$1)
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
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.
-
consistentHash
public ConsistentHash<Address> consistentHash()
Deprecated.
-
consistentHash_$eq
public void consistentHash_$eq(ConsistentHash<Address> x$1)
Deprecated.
-
clientInteractions
public scala.collection.immutable.HashMap<ActorRef,DeadlineFailureDetector> clientInteractions()
Deprecated.
-
clientInteractions_$eq
public void clientInteractions_$eq(scala.collection.immutable.HashMap<ActorRef,DeadlineFailureDetector> x$1)
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: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
public boolean matchingRole(Member m)
Deprecated.
-
receive
public scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> 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
public void updateClientInteractions(ActorRef client)
Deprecated.
-
publishClientsUnreachable
public void publishClientsUnreachable()
Deprecated.
-
-