Class EntityRef<M>
- java.lang.Object
-
- akka.cluster.sharding.typed.javadsl.EntityRef<M>
-
- All Implemented Interfaces:
RecipientRef<M>
- Direct Known Subclasses:
EntityRefImpl
public abstract class EntityRef<M> extends java.lang.Object implements RecipientRef<M>
Send a message to the entity referenced by this EntityRef using *at-most-once* messaging semantics.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface akka.actor.typed.RecipientRef
RecipientRef.RecipientRefOps<T>, RecipientRef.RecipientRefOps$
-
-
Constructor Summary
Constructors Constructor Description EntityRef()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract <U> java.util.concurrent.CompletionStage<U>
ask(Function<ActorRef<U>,M> message, Timeout timeout)
Allows to "ask" theEntityRef
for a reply.EntityRef<M>
asScala()
INTERNAL APIabstract void
tell(M msg)
Send a message to the destination referenced by thisRecipientRef
using *at-most-once* messaging semantics.
-
-
-
Method Detail
-
ask
public abstract <U> java.util.concurrent.CompletionStage<U> ask(Function<ActorRef<U>,M> message, Timeout timeout)
Allows to "ask" theEntityRef
for a reply. SeeAskPattern
for a complete write-up of this patternNote that if you are inside of an actor you should prefer
akka.actor.typed.javadsl.ActorContext.ask
as that provides better safety.- Parameters:
message
- (undocumented)timeout
- (undocumented)- Returns:
- (undocumented)
-
tell
public abstract void tell(M msg)
Description copied from interface:RecipientRef
Send a message to the destination referenced by thisRecipientRef
using *at-most-once* messaging semantics.- Specified by:
tell
in interfaceRecipientRef<M>
- Parameters:
msg
- (undocumented)
-
-