| Modifier and Type | Field and Description |
|---|---|
| private Throwable | |
| private final AtomicBoolean | |
| private final CountDownLatch | |
| private C | |
| private static Throwable |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public |
| 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 completeImplements java. Attempts to cancel execution of this task. |
| public void | failed(Throwable
the reason for the operation failure cause)Overrides default org. Callback invoked when the operation fails. |
| public C | get()
Implements java. Waits if necessary for the computation to complete, and then retrieves its result. |
| public C | get(long
the maximum time to wait timeout, TimeUnit the time unit of the timeout argument unit)Implements java. Waits if necessary for at most the given time for the computation to complete, and then retrieves its result, if available. |
| public C | Returns: the computed resultReturn the result if completed successfully or in the case of failure, throw the Exception/Error, or an ExecutionException wrapping the cause if it is neither an Exception or Error. |
| public boolean | isCancelled()
Implements java. Returns |
| public boolean | |
| public static void | |
| public void | succeeded(C
the context result)Overrides default org. Callback invoked when the operation completes. |
| public String |
| _cause | back to summary |
|---|---|
| private Throwable _cause | |
| _done | back to summary |
|---|---|
| private final AtomicBoolean _done | |
| _latch | back to summary |
|---|---|
| private final CountDownLatch _latch | |
| _result | back to summary |
|---|---|
| private C _result | |
| COMPLETED | back to summary |
|---|---|
| private static Throwable COMPLETED | |
| FuturePromise | back to summary |
|---|---|
| public FuturePromise() | |
| FuturePromise | back to summary |
|---|---|
| public FuturePromise(C result) | |
| FuturePromise | back to summary |
|---|---|
| public FuturePromise(C ctx, Throwable failed) | |
| cancel | back to summary |
|---|---|
| public boolean cancel(boolean mayInterruptIfRunning) 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
| |
| failed | back to summary |
|---|---|
| public void failed(Throwable cause) Overrides default org. Doc from org. Callback invoked when the operation fails. | |
| get | back to summary |
|---|---|
| public C get() throws InterruptedException, ExecutionException Implements java. Doc from java. Waits if necessary for the computation to complete, and then retrieves its result.
| |
| get | back to summary |
|---|---|
| public C get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException Implements java. Doc from java. Waits if necessary for at most the given time for the computation to complete, and then retrieves its result, if available.
| |
| getOrThrow | back to summary |
|---|---|
| public C getOrThrow() throws Exception Return the result if completed successfully or in the case of failure, throw the Exception/Error, or an ExecutionException wrapping the cause if it is neither an Exception or Error.
| |
| isCancelled | back to summary |
|---|---|
| public boolean isCancelled() Implements java. Doc from java. Returns
| |
| isDone | back to summary |
|---|---|
| public boolean isDone() Implements java. Doc from java. Returns
| |
| rethrow | back to summary |
|---|---|
| public static void rethrow(ExecutionException e) throws IOException | |
| succeeded | back to summary |
|---|---|
| public void succeeded(C result) Overrides default org. Doc from org. Callback invoked when the operation completes.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |