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>
public abstract class AbstractFutureProxy<V> extends Object implements Future<V>
Proxies to aFuturefor subclassing.- Since:
- 3.13.0
-
-
Constructor Summary
Constructors Constructor Description AbstractFutureProxy(Future<V> future)Constructs a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancancel(boolean mayInterruptIfRunning)Vget()Vget(long timeout, TimeUnit unit)Future<V>getFuture()Gets the delegate.booleanisCancelled()booleanisDone()
-
-
-
Constructor Detail
-
AbstractFutureProxy
public AbstractFutureProxy(Future<V> future)
Constructs a new instance.- Parameters:
future- the delegate.
-
-
Method Detail
-
cancel
public boolean cancel(boolean mayInterruptIfRunning)
-
get
public V get() throws InterruptedException, ExecutionException
- Specified by:
getin interfaceFuture<V>- Throws:
InterruptedExceptionExecutionException
-
get
public V get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException
- Specified by:
getin interfaceFuture<V>- Throws:
InterruptedExceptionExecutionExceptionTimeoutException
-
isCancelled
public boolean isCancelled()
- Specified by:
isCancelledin interfaceFuture<V>
-
-