|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.google.common.util.concurrent.AbstractFuture<V>
com.google.common.util.concurrent.SettableFuture<V>
public final class SettableFuture<V>
A ListenableFuture whose result may be set by a set(Object)
or setException(Throwable) call. It may also be cancelled.
ValueFuture)| Method Summary | ||
|---|---|---|
static
|
create()
Creates a new SettableFuture in the default state. |
|
boolean |
set(V value)
Sets the value of this future. |
|
boolean |
setException(Throwable throwable)
Sets the future to having failed with the given exception. |
|
| Methods inherited from class com.google.common.util.concurrent.AbstractFuture |
|---|
addListener, cancel, cancel, done, get, get, interruptTask, isCancelled, isDone |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static <V> SettableFuture<V> create()
SettableFuture in the default state.
public boolean set(@Nullable
V value)
true if
the value was successfully set, or false if the future has already
been set or cancelled.
set in class AbstractFuture<V>value - the value the future should hold.
public boolean setException(Throwable throwable)
ExecutionException and thrown from the get methods. This method will return true if the exception was
successfully set, or false if the future has already been set or
cancelled.
setException in class AbstractFuture<V>throwable - the exception the future should hold.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||