Class AbstractFutureProxy<V>
java.lang.Object
org.apache.commons.lang3.concurrent.AbstractFutureProxy<V>
- Type Parameters:
V
- The result type returned by this Future'sget()
andget(long, TimeUnit)
methods.
- All Implemented Interfaces:
Future<V>
Proxies to a
Future
for subclassing.- Since:
- 3.13.0
-
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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.concurrent.Future
exceptionNow, resultNow, state
-
Constructor Details
-
AbstractFutureProxy
Constructs a new instance.- Parameters:
future
- the delegate.
-
-
Method Details
-
cancel
public boolean cancel(boolean mayInterruptIfRunning) -
get
- Specified by:
get
in interfaceFuture<V>
- Throws:
InterruptedException
ExecutionException
-
get
public V get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException - Specified by:
get
in interfaceFuture<V>
- Throws:
InterruptedException
ExecutionException
TimeoutException
-
getFuture
Gets the delegate.- Returns:
- the delegate.
-
isCancelled
public boolean isCancelled()- Specified by:
isCancelled
in interfaceFuture<V>
-
isDone
public boolean isDone()
-