Future
which is writable.
Modifier and Type | Method and Description |
---|---|
public Promise | addListener(GenericFutureListener<? extends Future<? super V>> listener)
Redeclares io. |
public Promise | addListeners(GenericFutureListener<? extends Future<? super V>>... listeners)
Redeclares io. |
public Promise | |
public Promise | awaitUninterruptibly()
Redeclares io. |
public Promise | removeListener(GenericFutureListener<? extends Future<? super V>> listener)
Redeclares io. |
public Promise | removeListeners(GenericFutureListener<? extends Future<? super V>>... listeners)
Redeclares io. |
public Promise | |
public Promise | |
public boolean | Returns: true if and only if successfully marked this future as uncancellable or it is already done
without being cancelled. false if this future has been cancelled already.Make this future impossible to cancel. |
public Promise | sync()
Redeclares io. |
public Promise | syncUninterruptibly()
Redeclares io. |
public boolean | Returns: true if and only if successfully marked this future as
a failure. Otherwise false because this future is
already marked as either a success or a failure.Marks this future as a failure and notifies all listeners. |
public boolean | Returns: true if and only if successfully marked this future as
a success. Otherwise false because this future is
already marked as either a success or a failure.Marks this future as a success and notifies all listeners. |
addListener | back to summary |
---|---|
public Promise Redeclares io. Doc from io. Adds the specified listener to this future. The specified listener is notified when this future is done. If this future is already completed, the specified listener is notified immediately.
|
addListeners | back to summary |
---|---|
public Promise Redeclares io. Doc from io. Adds the specified listeners to this future. The specified listeners are notified when this future is done. If this future is already completed, the specified listeners are notified immediately.
|
await | back to summary |
---|---|
public Promise Redeclares io. Doc from io. Waits for this future to be completed.
|
awaitUninterruptibly | back to summary |
---|---|
public Promise Redeclares io. Doc from io. Waits for this future to be completed without
interruption. This method catches an
|
removeListener | back to summary |
---|---|
public Promise Redeclares io. Doc from io. Removes the first occurrence of the specified listener from this future. The specified listener is no longer notified when this future is done. If the specified listener is not associated with this future, this method does nothing and returns silently.
|
removeListeners | back to summary |
---|---|
public Promise Redeclares io. Doc from io. Removes the first occurrence for each of the listeners from this future. The specified listeners are no longer notified when this future is done. If the specified listeners are not associated with this future, this method does nothing and returns silently.
|
setFailure | back to summary |
---|---|
public Promise Marks this future as a failure and notifies all
listeners.
If it is success or failed already it will throw an |
setSuccess | back to summary |
---|---|
public Promise Marks this future as a success and notifies all
listeners.
If it is success or failed already it will throw an |
setUncancellable | back to summary |
---|---|
public boolean setUncancellable() Make this future impossible to cancel.
|
sync | back to summary |
---|---|
public Promise Redeclares io. Doc from io. Waits for this future until it is done, and rethrows the cause of the failure if this future failed.
|
syncUninterruptibly | back to summary |
---|---|
public Promise Redeclares io. Doc from io. Waits for this future until it is done, and rethrows the cause of the failure if this future failed.
|
tryFailure | back to summary |
---|---|
public boolean tryFailure(Throwable cause) Marks this future as a failure and notifies all listeners.
|
trySuccess | back to summary |
---|---|
public boolean trySuccess(V result) Marks this future as a success and notifies all listeners.
|