Modifier and Type | Class and Description |
---|---|
private static class | |
private static class |
Modifier and Type | Field and Description |
---|---|
private static final Runnable | |
private static final Runnable | |
private static final Runnable | |
private Object |
Access | Constructor and Description |
---|---|
pack-priv | |
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. |
private boolean | |
public final boolean | equals(Object
the reference object with which to compare. obj)Overrides java. |
public final int | |
public void | run()
Implements java. |
pack-priv V | |
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 | |
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. |
protected final boolean |
CANCELLED | back to summary |
---|---|
private static final Runnable CANCELLED |
COMPLETED | back to summary |
---|---|
private static final Runnable COMPLETED |
FAILED | back to summary |
---|---|
private static final Runnable FAILED |
task | back to summary |
---|---|
private Object task |
PromiseTask | back to summary |
---|---|
pack-priv PromiseTask(EventExecutor executor, Runnable runnable, V result) |
PromiseTask | back to summary |
---|---|
pack-priv PromiseTask(EventExecutor executor, Runnable runnable) |
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
|
clearTaskAfterCompletion | back to summary |
---|---|
private boolean clearTaskAfterCompletion(boolean done, Runnable result) |
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 this 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.
|
runTask | back to summary |
---|---|
pack-priv V runTask() throws Throwable
|
setFailure | back to summary |
---|---|
public final Promise Overrides io. Implements io. Doc from io. Marks this future as a failure and notifies all
listeners.
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 future as a success and notifies all
listeners.
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 future impossible to cancel.
|
setUncancellableInternal | back to summary |
---|---|
protected final boolean setUncancellableInternal() |
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 future 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.
|
trySuccessInternal | back to summary |
---|---|
protected final boolean trySuccessInternal(V result) |
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. |
Access | Constructor and Description |
---|---|
pack-priv |
Modifier and Type | Method and Description |
---|---|
public void | |
public String |
name | back to summary |
---|---|
private final String name |
SentinelRunnable | back to summary |
---|---|
pack-priv SentinelRunnable(String name) |
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. |