public class DefaultCancelFuture extends DefaultSshFuture<CancelFuture> implements CancelFuture
CancelFuture.log| Modifier | Constructor and Description |
|---|---|
protected |
DefaultCancelFuture(Object id) |
| Modifier and Type | Method and Description |
|---|---|
CancellationException |
getBackTrace()
Obtains an exception describing the stack trace of where the cancellation was initiated.
|
boolean |
isCanceled()
Tells whether the cancellation has been effected.
|
void |
setBackTrace(CancellationException backTrace)
Sets a
CancellationException describing the stack trace of where the cancellation was initiated. |
void |
setCanceled()
Marks this
CancelFuture as the cancellation having been effected. |
void |
setCanceled(Throwable error)
Marks this
CancelFuture as the cancellation having been effected. |
void |
setNotCanceled()
Completes this future with a value indicating that the cancellation was not done.
|
Boolean |
verify(long timeoutMillis,
CancelOption... options)
Wait and verify that the operation was successful
|
addListener, await0, createCancellation, getNumRegisteredListeners, getValue, isDone, notifyListeners, onValueSet, removeListener, setValue, toStringasListener, asT, await, awaitUninterruptibly, formatExceptionMessage, getId, notifyListener, verifyResultdebug, debug, debug, debug, debug, error, error, error, error, error, getSimplifiedLogger, info, info, warn, warn, warn, warn, warn, warn, warn, warnclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddListener, removeListenerawait, await, await, await, await, await, await, await, awaitUninterruptibly, awaitUninterruptibly, awaitUninterruptibly, awaitUninterruptibly, awaitUninterruptibly, awaitUninterruptibly, awaitUninterruptibly, awaitUninterruptibly, getId, isDoneprotected DefaultCancelFuture(Object id)
public Boolean verify(long timeoutMillis, CancelOption... options) throws IOException
verify in interface VerifiableFuture<Boolean>timeoutMillis - Wait timeout in millisecondsoptions - Optional CancelOptions defining the behavior on time-out or interrupt; ignored if
the future is not Cancellable.isCanceled()IOException - If failed to verify successfully on timepublic void setCanceled()
CancelFutureCancelFuture as the cancellation having been effected.
This is a framework-internal method.
setCanceled in interface CancelFuturepublic void setCanceled(Throwable error)
CancelFutureCancelFuture as the cancellation having been effected.
This is a framework-internal method.
setCanceled in interface CancelFutureerror - optional Throwable, if non-null, it'll be attached to the backtrace.public void setNotCanceled()
CancelFuturesetNotCanceled in interface CancelFuturepublic boolean isCanceled()
CancelFutureWaitableFuture.isDone() && !isCanceled()) means the
cancellation was not effected. In that case check the original operation for a success or failure value.isCanceled in interface CancelFuturetrue if the cancellation was done; false otherwisepublic void setBackTrace(CancellationException backTrace)
CancelFutureCancellationException describing the stack trace of where the cancellation was initiated. Has no
effect if a backtrace was already set, or the given backtrace is null.
This is a framework-internal method.
setBackTrace in interface CancelFuturebackTrace - CancellationException to setpublic CancellationException getBackTrace()
CancelFuturegetBackTrace in interface CancelFutureCancellationExceptionCopyright © 2018–2024 The Apache Software Foundation. All rights reserved.