|
Groovy Documentation | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgrails.async.PromiseList
@groovy.transform.CompileStatic class PromiseList extends java.lang.Object
A list of promises
Field Summary | |
---|---|
protected java.util.List |
promises
|
Method Summary | |
---|---|
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 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 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() |
Field Detail |
---|
protected java.util.List promises
Method Detail |
---|
boolean add(java.lang.Object value)
callable
- The callable
boolean add(groovy.lang.Closure callable)
callable
- The callable
boolean add(Promise p)
callable
- The callable
java.util.List get()
@java.lang.Override java.util.List get(long timeout, java.util.concurrent.TimeUnit units)
PromiseList leftShift(groovy.lang.Closure callable)
callable
- The callable
PromiseList leftShift(java.lang.Object value)
callable
- The callable
PromiseList leftShift(Promise p)
callable
- The callable
@java.lang.SuppressWarnings("unchecked") Promise onComplete(groovy.lang.Closure callable)
callable
- The callable
@java.lang.SuppressWarnings("unchecked") Promise onError(groovy.lang.Closure callable)
@java.lang.SuppressWarnings("unchecked") Promise then(groovy.lang.Closure callable)
Groovy Documentation