public class AsyncFutureResultImpl<V> extends java.lang.Object implements AsyncFutureResult<V>
Constructor and Description |
---|
AsyncFutureResultImpl() |
Modifier and Type | Method and Description |
---|---|
void |
addConsumer(java.util.concurrent.Executor executor,
ResultConsumer<? super V> consumer) |
boolean |
cancel(boolean mayInterruptIfRunning) |
V |
get() |
V |
get(long timeout,
java.util.concurrent.TimeUnit unit) |
boolean |
isCancelled() |
boolean |
isDone() |
void |
set(V value) |
void |
setException(java.lang.Throwable t) |
public void addConsumer(java.util.concurrent.Executor executor, ResultConsumer<? super V> consumer)
addConsumer
in interface AsyncFuture<V>
public boolean cancel(boolean mayInterruptIfRunning)
cancel
in interface java.util.concurrent.Future<V>
public boolean isCancelled()
isCancelled
in interface java.util.concurrent.Future<V>
public boolean isDone()
isDone
in interface java.util.concurrent.Future<V>
public V get() throws java.lang.InterruptedException, java.util.concurrent.ExecutionException
get
in interface java.util.concurrent.Future<V>
java.lang.InterruptedException
java.util.concurrent.ExecutionException
public V get(long timeout, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException, java.util.concurrent.ExecutionException, java.util.concurrent.TimeoutException
get
in interface java.util.concurrent.Future<V>
java.lang.InterruptedException
java.util.concurrent.ExecutionException
java.util.concurrent.TimeoutException
public void set(V value)
set
in interface AsyncFutureResult<V>
public void setException(java.lang.Throwable t)
setException
in interface AsyncFutureResult<V>