| Modifier and Type | Field and Description |
|---|---|
| private final Future | |
| private final Promise | |
| private final Callable |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public RunnableFuture | addListener(FutureListener<? super V>
The listener to be called when this future completes. The listener will be passed this future as
an argument. listener)Implements io. |
| public <C> RunnableFuture | addListener(C
The context object that will be passed to the listener when this future completes. context, FutureContextListener<? super C, ? super V> The listener to be called when this future completes. The listener will be passed the given
context, and this future. listener)Implements io. |
| public FutureCompletionStage | asStage()
Implements io. FutureCompletionStage that reflects the state of this Future and so will receive all
updates as well.
|
| public boolean | cancel()
Implements io. |
| public Throwable | cause()
Implements io. |
| public EventExecutor | executor()
Implements io. EventExecutor that is tied to this Promise or Future.
|
| public V | getNow()
Implements io. |
| public boolean | isCancellable()
Implements io. true if and only if the operation can be cancelled via cancel().
|
| public boolean | isCancelled()
Implements io. true if this operation has been cancelled.
|
| public boolean | isDone()
Implements io. true if this operation has been completed either successfully, unsuccessfully, or through
cancellation.
|
| public boolean | isFailed()
Implements io. true if and only if the operation was completed and failed.
|
| public boolean | isSuccess()
Implements io. true if and only if the operation was completed successfully.
|
| public void | |
| public String |
| future | back to summary |
|---|---|
| private final Future<V> future | |
| promise | back to summary |
|---|---|
| private final Promise<V> promise | |
| task | back to summary |
|---|---|
| private final Callable<V> task | |
| RunnableFutureAdapter | back to summary |
|---|---|
| pack-priv RunnableFutureAdapter(Promise<V> promise, Callable<V> task) | |
| addListener | back to summary |
|---|---|
| public RunnableFuture Implements 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.
| |
| addListener | back to summary |
|---|---|
| public <C> RunnableFuture Implements 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.
| |
| asStage | back to summary |
|---|---|
| public FutureCompletionStage Implements io. Doc from io. Returns a
The returned
| |
| cancel | back to summary |
|---|---|
| public boolean cancel() Implements io. Doc from io. Cancel this asynchronous operation, unless it has already been completed or is not cancellable. A cancelled operation is considered to be done and failed.
If the cancellation was successful, the result of this operation will be that it has failed with a
Cancellation will not cause any threads working on the operation to be interrupted.
| |
| cause | back to summary |
|---|---|
| public Throwable cause() Implements io. Doc from io. Returns the cause of the failed operation if the operation has failed. | |
| executor | back to summary |
|---|---|
| public EventExecutor executor() Implements io. Doc from io. Returns the
| |
| getNow | back to summary |
|---|---|
| public V getNow() Implements io. Doc from io. Return the successful result of this asynchronous operation, if any.
If the operation has not yet been completed, then this will throw
| |
| isCancellable | back to summary |
|---|---|
| public boolean isCancellable() Implements io. Doc from io. Returns
| |
| isCancelled | back to summary |
|---|---|
| public boolean isCancelled() Implements io. Doc from io. Return
| |
| isDone | back to summary |
|---|---|
| public boolean isDone() Implements io. Doc from io. Return
| |
| isFailed | back to summary |
|---|---|
| public boolean isFailed() Implements io. Doc from io. Returns
| |
| isSuccess | back to summary |
|---|---|
| public boolean isSuccess() Implements io. Doc from io. Returns
| |
| run | back to summary |
|---|---|
| public void run() Implements java. Doc from java. Runs this operation.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |