| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| protected final Callable |
| Access | Constructor and Description |
|---|---|
| pack-priv | |
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | cancel(boolean
true if the thread
executing this task should be interrupted (if the thread is
known to the implementation); otherwise, in-progress tasks are
allowed to completeOverrides io. Implements java. |
| public final boolean | equals(Object
the reference object with which to compare. obj)Overrides java. |
| public final int | |
| public void | run()
Implements java. |
| public final Promise | setFailure(Throwable cause)
Overrides io. Implements io. |
| protected final Promise | |
| public final Promise | setSuccess(V result)
Overrides io. Implements io. |
| protected final Promise | |
| public final boolean | setUncancellable()
Overrides io. Implements io. |
| protected final boolean | |
| pack-priv static <T> Callable | |
| protected StringBuilder | |
| public final boolean | tryFailure(Throwable cause)
Overrides io. Implements io. |
| protected final boolean | |
| public final boolean | trySuccess(V result)
Overrides io. Implements io. |
| task | back to summary |
|---|---|
| protected final Callable<V> task | |
| PromiseTask | back to summary |
|---|---|
| pack-priv PromiseTask(EventExecutor executor, Runnable runnable, V result) | |
| PromiseTask | back to summary |
|---|---|
| pack-priv PromiseTask(EventExecutor executor, Callable<V> callable) | |
| cancel | back to summary |
|---|---|
| public boolean cancel(boolean mayInterruptIfRunning) Overrides io. Implements java. Doc from java. Attempts to cancel execution of this task. This method has no
effect if the task is already completed or cancelled, or could
not be cancelled for some other reason. Otherwise, if this
task has not started when The return value from this method does not necessarily
indicate whether the task is now cancelled; use
| |
| equals | back to summary |
|---|---|
| public final boolean equals(Object obj) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| hashCode | back to summary |
|---|---|
| public final int hashCode() Overrides java. Doc from java. Returns a hash code value for the object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| run | back to summary |
|---|---|
| public void run() Implements java. Doc from java. Sets this Future to the result of its computation unless it has been cancelled.
| |
| setFailure | back to summary |
|---|---|
| public final Promise Overrides io. Implements io. Doc from io. Marks this promise as a failure and notifies all listeners attached to the future.
If it is success or failed already it will throw an
| |
| setFailureInternal | back to summary |
|---|---|
| protected final Promise | |
| setSuccess | back to summary |
|---|---|
| public final Promise Overrides io. Implements io. Doc from io. Marks this promise as a success and notifies all listeners attached to the future.
If it is success or failed already it will throw an
| |
| setSuccessInternal | back to summary |
|---|---|
| protected final Promise | |
| setUncancellable | back to summary |
|---|---|
| public final boolean setUncancellable() Overrides io. Implements io. Doc from io. Make this promise impossible to cancel.
| |
| setUncancellableInternal | back to summary |
|---|---|
| protected final boolean setUncancellableInternal() | |
| toCallable | back to summary |
|---|---|
| pack-priv static <T> Callable | |
| toStringBuilder | back to summary |
|---|---|
| protected StringBuilder toStringBuilder() Overrides io.
| |
| tryFailure | back to summary |
|---|---|
| public final boolean tryFailure(Throwable cause) Overrides io. Implements io. Doc from io. Marks this promise as a failure and notifies all listeners.
| |
| tryFailureInternal | back to summary |
|---|---|
| protected final boolean tryFailureInternal(Throwable cause) | |
| trySuccess | back to summary |
|---|---|
| public final boolean trySuccess(V result) Overrides io. Implements io. Doc from io. Marks this future as a success and notifies all listeners.
| |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final T | |
| pack-priv final Runnable |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public T | call()
Implements java. |
| public String |
| result | back to summary |
|---|---|
| pack-priv final T result | |
| task | back to summary |
|---|---|
| pack-priv final Runnable task | |
| RunnableAdapter | back to summary |
|---|---|
| pack-priv RunnableAdapter(Runnable task, T result) | |
| call | back to summary |
|---|---|
| public T call() Implements java. Doc from java. Computes a result, or throws an exception if unable to do so.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |