Class Futures.NonCancellationPropagatingFuture<V>

All Implemented Interfaces:
AbstractFuture.Trusted<V>, ListenableFuture<V>, Runnable, Future<V>
Enclosing class:
Futures

private static final class Futures.NonCancellationPropagatingFuture<V> extends AbstractFuture.TrustedFuture<V> implements Runnable
A wrapped future that does not propagate cancellation to its delegate.
  • Field Details

  • Constructor Details

    • NonCancellationPropagatingFuture

      NonCancellationPropagatingFuture(ListenableFuture<V> delegate)
  • Method Details

    • run

      public void run()
      Specified by:
      run in interface Runnable
    • pendingToString

      @CheckForNull protected String pendingToString()
      Description copied from class: AbstractFuture
      Provide a human-readable explanation of why this future has not yet completed.
      Overrides:
      pendingToString in class AbstractFuture<V>
      Returns:
      null if an explanation cannot be provided (e.g. because the future is done).
    • afterDone

      protected void afterDone()
      Description copied from class: AbstractFuture
      Callback method that is called exactly once after the future is completed.

      If AbstractFuture.interruptTask() is also run during completion, AbstractFuture.afterDone() runs after it.

      The default implementation of this method in AbstractFuture does nothing. This is intended for very lightweight cleanup work, for example, timing statistics or clearing fields. If your task does anything heavier consider, just using a listener with an executor.

      Overrides:
      afterDone in class AbstractFuture<V>