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>
InterruptedException
ExecutionException
public R get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException
get
in interface Future<R>
InterruptedException
ExecutionException
TimeoutException
public void onResult(AsyncResult<T> result)
AsyncFutureListener
onResult
in interface AsyncFutureListener<T>
Copyright © GigaSpaces.