public class SettableListenableFuture<V> extends SettableFuture<V> implements ListenableFuture<V>
Adds ListenableFuture support to SettableFuture through a delegate
Constructor and Description |
---|
SettableListenableFuture() |
Modifier and Type | Method and Description |
---|---|
void |
addListener(Runnable r,
Executor exctr) |
boolean |
set(V value) |
boolean |
setException(Throwable exception) |
cancel, get, get, interruptTask, isCancelled, isDone
public boolean set(V value)
set
in class SettableFuture<V>
public boolean setException(Throwable exception)
setException
in class SettableFuture<V>
public void addListener(Runnable r, Executor exctr) throws RejectedExecutionException, IllegalArgumentException
addListener
in interface ListenableFuture<V>
RejectedExecutionException
IllegalArgumentException