Interface CancelFuture

    • Method Detail

      • getBackTrace

        java.util.concurrent.CancellationException getBackTrace()
        Obtains an exception describing the stack trace of where the cancellation was initiated.
        Returns:
        a CancellationException
      • isCanceled

        boolean isCanceled()
        Tells whether the cancellation has been effected. (WaitableFuture.isDone() && !isCanceled()) means the cancellation was not effected. In that case check the original operation for a success or failure value.
        Returns:
        true if the cancellation was done; false otherwise
      • setCanceled

        void setCanceled()
        Marks this CancelFuture as the cancellation having been effected.

        This is a framework-internal method.

      • setCanceled

        void setCanceled​(java.lang.Throwable error)
        Marks this CancelFuture as the cancellation having been effected.

        This is a framework-internal method.

        Parameters:
        error - optional Throwable, if non-null, it'll be attached to the backtrace.
      • setBackTrace

        void setBackTrace​(java.util.concurrent.CancellationException backTrace)
        Sets a CancellationException 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.

        Parameters:
        backTrace - CancellationException to set
      • setNotCanceled

        void setNotCanceled()
        Completes this future with a value indicating that the cancellation was not done.