public final class PersistentEntityRef<Command> extends Object implements akka.actor.NoSerializationVerificationNeeded
PersistentEntity using a PersistentEntityRef. It is
retrieved with PersistentEntityRegistry.refFor(Class, String).| Constructor and Description |
|---|
PersistentEntityRef(String entityId,
akka.actor.ActorRef region,
akka.actor.ActorSystem system,
scala.concurrent.duration.FiniteDuration askTimeout)
Deprecated.
|
PersistentEntityRef(String entityId,
akka.actor.ActorRef region,
Duration askTimeout) |
PersistentEntityRef(String entityId,
akka.actor.ActorRef region,
scala.concurrent.duration.FiniteDuration askTimeout)
Deprecated.
As of Lagom 1.5. Use
PersistentEntityRef(String, ActorRef, Duration)
instead. |
| Modifier and Type | Method and Description |
|---|---|
<Reply,Cmd extends Object & PersistentEntity.ReplyType<Reply>> |
ask(Cmd command)
Send the
command to the PersistentEntity. |
String |
entityId() |
String |
toString() |
PersistentEntityRef<Command> |
withAskTimeout(Duration timeout)
The timeout for
ask(Object). |
PersistentEntityRef<Command> |
withAskTimeout(scala.concurrent.duration.FiniteDuration timeout)
Deprecated.
As of Lagom 1.5. Use
withAskTimeout(Duration) instead. |
@Deprecated public PersistentEntityRef(String entityId, akka.actor.ActorRef region, scala.concurrent.duration.FiniteDuration askTimeout)
PersistentEntityRef(String, ActorRef, Duration)
instead.public PersistentEntityRef(String entityId, akka.actor.ActorRef region, Duration askTimeout)
@Deprecated public PersistentEntityRef(String entityId, akka.actor.ActorRef region, akka.actor.ActorSystem system, scala.concurrent.duration.FiniteDuration askTimeout)
PersistentEntityRef(String, ActorRef, FiniteDuration) instead.public String entityId()
public <Reply,Cmd extends Object & PersistentEntity.ReplyType<Reply>> CompletionStage<Reply> ask(Cmd command)
command to the PersistentEntity. The returned
CompletionStage will be completed with the reply from the PersistentEntity.
The type of the reply is defined by the command (see PersistentEntity.ReplyType).
The CompletionStage may also be completed with failure, sent by the
PersistentEntity or a akka.pattern.AskTimeoutException if there is no reply
within a timeout. The timeout can defined in configuration or overridden using withAskTimeout(Duration).
@Deprecated public PersistentEntityRef<Command> withAskTimeout(scala.concurrent.duration.FiniteDuration timeout)
withAskTimeout(Duration) instead.ask(Object). The timeout is by default defined in configuration but it
can be adjusted for a specific PersistentEntityRef using this method. Note that
this returns a new PersistentEntityRef instance with the given timeout (
PersistentEntityRef is immutable).public PersistentEntityRef<Command> withAskTimeout(Duration timeout)
ask(Object). The timeout is by default defined in configuration but it
can be adjusted for a specific PersistentEntityRef using this method. Note that
this returns a new PersistentEntityRef instance with the given timeout (
PersistentEntityRef is immutable).