public class CancellableFuture<V> extends AFuture<V>
| Modifier and Type | Class and Description |
|---|---|
static interface |
CancellableFuture.CancelCallback |
AFuture.Function<A,B>| Constructor and Description |
|---|
CancellableFuture(AFuture<V> wrappedFuture,
CancellableFuture.CancelCallback cc) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
cancel(boolean mayInterruptIfRunning) |
V |
get() |
V |
get(long timeout,
java.util.concurrent.TimeUnit unit) |
boolean |
isCancelled() |
boolean |
isDone() |
public CancellableFuture(AFuture<V> wrappedFuture, CancellableFuture.CancelCallback cc)
public boolean cancel(boolean mayInterruptIfRunning)
public boolean isCancelled()
public boolean isDone()
public V get() throws java.lang.InterruptedException, java.util.concurrent.ExecutionException
java.lang.InterruptedExceptionjava.util.concurrent.ExecutionExceptionpublic V get(long timeout, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException, java.util.concurrent.ExecutionException, java.util.concurrent.TimeoutException
java.lang.InterruptedExceptionjava.util.concurrent.ExecutionExceptionjava.util.concurrent.TimeoutException