public static class Futures.WaitForAllFuture<V> extends Object implements Future<V>
add(java.util.concurrent.Future)
or the constructor. Waiting for all futures to finish is done
via get().
The get method call will throw Exceptions from the added futures.| Constructor and Description |
|---|
Futures.WaitForAllFuture(Future<V>... _top) |
Futures.WaitForAllFuture(Future<V> _top) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(Future<V> f)
Add a new future to the list for Futures we should wait for.
|
boolean |
cancel(boolean mayInterruptIfRunning)
Send cancel to all futures that are not yet cancelled.
|
V |
get()
Wait until everything is finished.
|
V |
get(long timeout,
TimeUnit unit) |
boolean |
isCancelled()
Unsupported, it is not possible to implement useful semantics.
|
boolean |
isDone()
True, if every future is done or no future is contained.
|
public Futures.WaitForAllFuture(Future<V> _top)
@SafeVarargs public Futures.WaitForAllFuture(Future<V>... _top)
public boolean cancel(boolean mayInterruptIfRunning)
public boolean isCancelled()
isCancelled in interface Future<V>public boolean isDone()
public V get() throws InterruptedException, ExecutionException
get in interface Future<V>InterruptedExceptionExecutionExceptionpublic V get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException
get in interface Future<V>InterruptedExceptionExecutionExceptionTimeoutExceptioncache2k API documentation. Copyright © 2000–2015 headissue GmbH, Munich.