public class AbstractFuture<V>
extends java.lang.Object
implements java.util.concurrent.Future<V>
| Constructor and Description |
|---|
AbstractFuture() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
cancel(boolean mayInterruptIfRunning) |
V |
get() |
V |
get(long timeout,
java.util.concurrent.TimeUnit unit) |
protected void |
interruptTask() |
boolean |
isCancelled() |
boolean |
isDone() |
protected boolean |
set(V value) |
protected boolean |
setException(java.lang.Throwable exception) |
public boolean isCancelled()
isCancelled in interface java.util.concurrent.Future<V>public boolean isDone()
isDone in interface java.util.concurrent.Future<V>protected boolean set(V value)
protected boolean setException(java.lang.Throwable exception)
public boolean cancel(boolean mayInterruptIfRunning)
cancel in interface java.util.concurrent.Future<V>@Suspendable public V get() throws java.lang.InterruptedException, java.util.concurrent.ExecutionException
get in interface java.util.concurrent.Future<V>java.lang.InterruptedExceptionjava.util.concurrent.ExecutionException@Suspendable 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.InterruptedExceptionjava.util.concurrent.ExecutionExceptionjava.util.concurrent.TimeoutExceptionprotected void interruptTask()