Formatting java codes with sbt-java-formatter.
This commit is contained in:
parent
27500001ea
commit
998c5a9285
401 changed files with 19750 additions and 17450 deletions
|
|
@ -17,15 +17,17 @@ import java.util.concurrent.TimeUnit;
|
|||
|
||||
public class SupervisedAskSpec {
|
||||
|
||||
public Object execute(Class<? extends AbstractActor> someActor,
|
||||
Object message, Duration timeout, ActorRefFactory actorSystem)
|
||||
public Object execute(
|
||||
Class<? extends AbstractActor> someActor,
|
||||
Object message,
|
||||
Duration timeout,
|
||||
ActorRefFactory actorSystem)
|
||||
throws Exception {
|
||||
// example usage
|
||||
try {
|
||||
ActorRef supervisorCreator = SupervisedAsk
|
||||
.createSupervisorCreator(actorSystem);
|
||||
CompletionStage<Object> finished = SupervisedAsk.askOf(supervisorCreator,
|
||||
Props.create(someActor), message, timeout);
|
||||
ActorRef supervisorCreator = SupervisedAsk.createSupervisorCreator(actorSystem);
|
||||
CompletionStage<Object> finished =
|
||||
SupervisedAsk.askOf(supervisorCreator, Props.create(someActor), message, timeout);
|
||||
return finished.toCompletableFuture().get(timeout.toMillis(), TimeUnit.MILLISECONDS);
|
||||
} catch (Exception e) {
|
||||
// exception propagated by supervision
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue