Constructor and Description |
---|
AbstractApiFuture() |
Modifier and Type | Method and Description |
---|---|
void |
addListener(Runnable listener,
Executor executor) |
boolean |
cancel(boolean mayInterruptIfRunning) |
V |
get() |
V |
get(long timeout,
TimeUnit unit) |
protected void |
interruptTask() |
boolean |
isCancelled() |
boolean |
isDone() |
boolean |
set(V value) |
boolean |
setException(Throwable throwable) |
public void addListener(Runnable listener, Executor executor)
addListener
in interface ApiFuture<V>
public boolean cancel(boolean mayInterruptIfRunning)
public V get() throws InterruptedException, ExecutionException
get
in interface Future<V>
InterruptedException
ExecutionException
public V get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException
get
in interface Future<V>
InterruptedException
ExecutionException
TimeoutException
public boolean isCancelled()
isCancelled
in interface Future<V>
public boolean set(V value)
public boolean setException(Throwable throwable)
protected void interruptTask()