Modifiers | Name | Description |
---|---|---|
protected java.util.List<T> |
initialized |
|
protected java.util.List<Promise<T>> |
promises |
Constructor and description |
---|
PromiseList
() |
Type Params | Return Type | Name and description |
---|---|---|
|
Promise<java.util.List<T>> |
accept(java.util.List<T> value) |
|
boolean |
add(T value) Implementation of add that adds any value as a bound promise |
|
boolean |
add(groovy.lang.Closure<T> closure) Implementation of add that takes a closure and creates a promise, adding it to the list |
|
boolean |
add(Promise<T> promise) 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<T> |
get() |
|
java.util.List<T> |
get(long timeout, java.util.concurrent.TimeUnit units) |
|
boolean |
isCancelled() |
|
boolean |
isDone() |
|
PromiseList<T> |
leftShift(groovy.lang.Closure<T> callable) Add a callable to the promise list |
|
PromiseList<T> |
leftShift(T value) Add a value as a bound promise to the list of values |
|
PromiseList<T> |
leftShift(Promise<T> promise) Add a promise to the promise list |
|
Promise<java.util.List<T>> |
onComplete(groovy.lang.Closure callable) Execute the given closure when all promises are complete |
|
Promise<java.util.List<T>> |
onError(groovy.lang.Closure callable) |
|
Promise<java.util.List<T>> |
then(groovy.lang.Closure callable) |
Methods inherited from class | Name |
---|---|
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(), java.lang.Object#wait(long), 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
value
- The valueImplementation of add that takes a closure and creates a promise, adding it to the list
closure
- The closureImplementation of add that takes a promise, adding it to the list
promise
- The promiseSynchronously obtains all the values from all the promises
Add a callable to the promise list
callable
- The callable closureAdd a value as a bound promise to the list of values
value
- valueAdd a promise to the promise list
promise
- The promiseExecute the given closure when all promises are complete
callable
- The closure