Class ClusterShardingSetup$
- java.lang.Object
-
- akka.cluster.sharding.typed.scaladsl.ClusterShardingSetup$
-
public class ClusterShardingSetup$ extends java.lang.Object
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.scaladsl.ActorContext.ask
as that provides better safety.Example usage:
case class Request(msg: String, replyTo: ActorRef[Reply]) case class Reply(msg: String) implicit val timeout = Timeout(3.seconds) val target: EntityRef[Request] = ... val f: Future[Reply] = target ? (Request("hello", _))
Please note that an implicit
Timeout
must be available to use this pattern.
-
-
Field Summary
Fields Modifier and Type Field Description static ClusterShardingSetup$
MODULE$
Static reference to the singleton instance of this Scala object.
-
Constructor Summary
Constructors Constructor Description ClusterShardingSetup$()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T extends Extension>
ClusterShardingSetupapply(scala.Function1<ActorSystem<?>,ClusterSharding> createExtension)
-
-
-
Field Detail
-
MODULE$
public static final ClusterShardingSetup$ MODULE$
Static reference to the singleton instance of this Scala object.
-
-
Method Detail
-
apply
public <T extends Extension> ClusterShardingSetup apply(scala.Function1<ActorSystem<?>,ClusterSharding> createExtension)
-
-