@groovy.transform.CompileStatic class PromiseList
A list of promises
Modifiers | Name | Description |
---|---|---|
protected java.util.List<T> |
initialized |
|
protected java.util.List<Promise> |
promises |
Type Params | Return Type | Name and description |
---|---|---|
|
Promise<java.util.List<T>> |
accept(java.util.List<T> value) |
|
boolean |
add(java.lang.Object value) Implementation of add that adds any value as a bound promise |
|
boolean |
add(groovy.lang.Closure callable) Implementation of add that takes a closure and creates a promise, adding it to the list |
|
boolean |
add(Promise<T> p) Implementation of add that takes a promise, adding it to the list |
|
boolean |
cancel(boolean mayInterruptIfRunning) Synchronously obtains all the values from all the promises |
|
java.util.List |
get() |
|
java.util.List |
get(long timeout, java.util.concurrent.TimeUnit units) |
|
boolean |
isCancelled() |
|
boolean |
isDone() |
|
PromiseList |
leftShift(groovy.lang.Closure callable) Add a promise to the promise list |
|
PromiseList |
leftShift(java.lang.Object value) Add a value as a bound promise to the list of values |
|
PromiseList |
leftShift(Promise p) Add a promise to the promise list |
|
Promise |
onComplete(groovy.lang.Closure callable) Execute the given closure when all promises are complete |
|
Promise |
onError(groovy.lang.Closure callable) |
|
Promise |
then(groovy.lang.Closure callable) |
Methods inherited from class | Name |
---|---|
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Implementation of add that adds any value as a bound promise
callable
- The callableImplementation of add that takes a closure and creates a promise, adding it to the list
callable
- The callableImplementation of add that takes a promise, adding it to the list
callable
- The callableSynchronously obtains all the values from all the promises
Add a promise to the promise list
callable
- The callableAdd a value as a bound promise to the list of values
callable
- The callableAdd a promise to the promise list
callable
- The callableExecute the given closure when all promises are complete
callable
- The callable