@groovy.transform.CompileStatic class PromiseList extends java.lang.Object
A list of promises
Type Params | Return Type | Name and description |
---|---|---|
|
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 |
|
java.util.List |
get() Synchronously obtains all the values from all the promises |
|
java.util.List |
get(long timeout, java.util.concurrent.TimeUnit units) |
|
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