@groovy.transform.AutoFinal @groovy.transform.CompileStatic class FutureTaskPromise<T> extends java.util.concurrent.FutureTask<T> implements Promise<T>
A Promise that is a java.util.concurrent.FutureTask
Constructor and description |
---|
FutureTaskPromise
(PromiseFactory promiseFactory, java.util.concurrent.Callable<T> callable) |
FutureTaskPromise
(PromiseFactory promiseFactory, java.lang.Runnable runnable, T value) |
Type Params | Return Type | Name and description |
---|---|---|
|
Promise<T> |
accept(T value) |
|
T |
get() |
|
T |
get(long timeout, java.util.concurrent.TimeUnit unit) |
|
boolean |
isDone() |
|
Promise<T> |
onComplete(groovy.lang.Closure<T> callable) |
|
Promise<T> |
onError(groovy.lang.Closure<T> callable) |
|
protected void |
set(T t) |
|
protected void |
setException(java.lang.Throwable t) |
|
Promise<T> |
then(groovy.lang.Closure<T> callable) |