Package org.apache.pekko.pattern
Class PromiseRef$
java.lang.Object
org.apache.pekko.pattern.PromiseRef$
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final PromiseRef$Static reference to the singleton instance of this Scala object. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapply(ActorSystem system, Timeout timeout) Constructs a new PromiseRef which will be completed with the first message sent to it.apply(Timeout timeout, ActorSystem system) Constructs a new PromiseRef which will be completed with the first message sent to it.
-
Field Details
-
MODULE$
Static reference to the singleton instance of this Scala object.
-
-
Constructor Details
-
PromiseRef$
public PromiseRef$()
-
-
Method Details
-
apply
Constructs a new PromiseRef which will be completed with the first message sent to it.// enables transparent use of PromiseRef as ActorRef and Promise import PromiseRef.Implicits._ val promiseRef = PromiseRef(system, 5.seconds) promiseRef ! "message" promiseRef.onComplete(println) // prints "message" -
apply
Constructs a new PromiseRef which will be completed with the first message sent to it.// enables transparent use of PromiseRef as ActorRef and Promise import PromiseRef.Implicits._ // requires an implicit ActorSystem in scope val promiseRef = PromiseRef(5.seconds) promiseRef ! "message" promiseRef.future.onComplete(println) // prints "message"
-