Cancellable future is considered
canceled immediately, it may take some time until the underlying asynchronous operation is really canceled. A
cancellation through Cancellable#cancel() returns a CancelFuture that can be used to wait for the
cancellation to have been effected.
A CancelFuture is not cancellable itself.
Cancellable
| Modifier and Type | Method and Description |
|---|---|
| public CancellationException | Returns: aCancellationExceptionObtains an exception describing the stack trace of where the cancellation was initiated. |
| public boolean | Returns: true if the cancellation was done; false otherwiseTells whether the cancellation has been effected. |
| public void | setBackTrace(CancellationException
CancellationException to setSets a |
| public void | |
| public void | setCanceled(Throwable
optional error)Throwable, if non-null, it'll be attached to the backtrace.Marks this |
| public void |
| getBackTrace | back to summary |
|---|---|
| public CancellationException getBackTrace() Obtains an exception describing the stack trace of where the cancellation was initiated. | |
| isCanceled | back to summary |
|---|---|
| public boolean isCanceled() Tells whether the cancellation has been effected. (
| |
| setBackTrace | back to summary |
|---|---|
| public void setBackTrace(CancellationException backTrace) Sets a This is a framework-internal method.
| |
| setCanceled | back to summary |
|---|---|
| public void setCanceled() Marks this This is a framework-internal method. | |
| setCanceled | back to summary |
|---|---|
| public void setCanceled(Throwable error) Marks this This is a framework-internal method. | |
| setNotCanceled | back to summary |
|---|---|
| public void setNotCanceled() Completes this future with a value indicating that the cancellation was not done. | |