public class InParallel extends Object
| Modifier and Type | Method and Description |
|---|---|
void |
eachAttemptTo(Collection<Performable> tasks) |
void |
eachAttemptTo(Performable... tasks)
Have several actors perform a given task in parallel, for example:
|
void |
perform(List<Runnable> tasks) |
void |
perform(Runnable... tasks) |
void |
perform(String stepName,
Runnable... tasks) |
static InParallel |
theActors(Actor... actors)
Perform the specified tasks in parallel.
|
static InParallel |
theActors(Collection<Actor> actors)
Useful if you have a collection or cast of actors.
|
public static InParallel theActors(Actor... actors)
InParallel.theActors(johny, gina, jimmy).perform(
() -> johnny.attemptsTo(BookFlight.from("New York).to("London")),
() -> gina.attemptsTo(BookFlight.from("New York).to("Los Angeles")),
() -> jimmy.attemptsTo(BookFlight.from("Sydney).to("Hong Kong")),
);
public static InParallel theActors(Collection<Actor> actors)
public void perform(Runnable... tasks)
public void eachAttemptTo(Performable... tasks)
InParallel.theActors(johny, gina, jimmy).eachAttemptTo(BookFlight.from("New York).to("London"));
public void eachAttemptTo(Collection<Performable> tasks)
Copyright © 2021. All rights reserved.