Package com.logicaldoc.util.concurrent
Class SerialFuture<V>
java.lang.Object
com.logicaldoc.util.concurrent.SerialFuture<V>
- Type Parameters:
V
- Type of all the futures to wait for
- All Implemented Interfaces:
Future<V>
A future returns null but waits for the completion of a given collection of
futures
- Since:
- 9.2
- Author:
- Marco Meschieri - LogicalDOC
-
Nested Class Summary
Nested classes/interfaces inherited from interface java.util.concurrent.Future
Future.State
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.concurrent.Future
exceptionNow, resultNow, state
-
Constructor Details
-
SerialFuture
-
-
Method Details
-
cancel
public boolean cancel(boolean mayInterruptIfRunning) -
isCancelled
public boolean isCancelled()- Specified by:
isCancelled
in interfaceFuture<V>
-
isDone
public boolean isDone() -
get
- Specified by:
get
in interfaceFuture<V>
- Throws:
InterruptedException
ExecutionException
-
getAll
-
get
public V get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException - Specified by:
get
in interfaceFuture<V>
- Throws:
InterruptedException
ExecutionException
TimeoutException
-
getAll
public List<V> getAll(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException
-