T - the future get typepublic class TaskFutureWrapper<T> extends Object implements TaskFuture<T>
| Constructor and Description |
|---|
TaskFutureWrapper(Future<T> future) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
cancel(boolean mayInterruptIfRunning) |
T |
get() |
T |
get(long timeout,
TimeUnit unit) |
protected Future<T> |
getFuture() |
boolean |
isCancelled() |
boolean |
isDone() |
protected void |
setFuture(Future<T> future) |
public boolean cancel(boolean mayInterruptIfRunning)
public boolean isCancelled()
isCancelled in interface Future<T>public T get() throws InterruptedException, ExecutionException
get in interface Future<T>InterruptedExceptionExecutionExceptionpublic T get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException
get in interface Future<T>InterruptedExceptionExecutionExceptionTimeoutExceptionprotected final void setFuture(Future<T> future)
future - the future to save in the cacheCopyright © 2019. All rights reserved.