Package one.nio.async
Class CombinedFuture<V>
- java.lang.Object
-
- one.nio.async.CombinedFuture<V>
-
- All Implemented Interfaces:
Serializable,Future<List<V>>
public class CombinedFuture<V> extends Object implements Future<List<V>>, Serializable
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description CombinedFuture(Collection<Future> futures)CombinedFuture(Future<V>... futures)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancancel(boolean mayInterruptIfRunning)List<V>get()List<V>get(long timeout, TimeUnit unit)booleanisCancelled()booleanisDone()
-
-
-
Constructor Detail
-
CombinedFuture
public CombinedFuture(Collection<Future> futures)
-
-
Method Detail
-
cancel
public boolean cancel(boolean mayInterruptIfRunning)
-
isCancelled
public boolean isCancelled()
- Specified by:
isCancelledin interfaceFuture<V>
-
get
public List<V> get() throws InterruptedException, ExecutionException
- Specified by:
getin interfaceFuture<V>- Throws:
InterruptedExceptionExecutionException
-
get
public List<V> get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException
- Specified by:
getin interfaceFuture<V>- Throws:
InterruptedExceptionExecutionExceptionTimeoutException
-
-