public class CompoundFuture<T,R> extends Object implements AsyncFuture<R>, AsyncFutureListener<T>
| Constructor and Description |
|---|
CompoundFuture(AsyncFuture<T>[] futures,
AsyncResultsReducer<T,R> reducer) |
CompoundFuture(AsyncFuture<T>[] futures,
AsyncResultsReducer<T,R> reducer,
AsyncResultFilter<T> moderator) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
cancel(boolean mayInterruptIfRunning) |
R |
get() |
R |
get(long timeout,
TimeUnit unit) |
boolean |
isCancelled() |
boolean |
isDone() |
void |
onResult(AsyncResult<T> result)
A callback when a result of an async invocation arrives.
|
void |
setListener(AsyncFutureListener<R> listener) |
public CompoundFuture(AsyncFuture<T>[] futures, AsyncResultsReducer<T,R> reducer)
public CompoundFuture(AsyncFuture<T>[] futures, AsyncResultsReducer<T,R> reducer, AsyncResultFilter<T> moderator)
public void setListener(AsyncFutureListener<R> listener)
setListener in interface AsyncFuture<R>public boolean cancel(boolean mayInterruptIfRunning)
public boolean isCancelled()
isCancelled in interface Future<R>public R get() throws InterruptedException, ExecutionException
get in interface Future<R>InterruptedExceptionExecutionExceptionpublic R get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException
get in interface Future<R>InterruptedExceptionExecutionExceptionTimeoutExceptionpublic void onResult(AsyncResult<T> result)
AsyncFutureListeneronResult in interface AsyncFutureListener<T>Copyright © GigaSpaces.