Module methanol

Class CancellationPropagatingFuture<T>

  • All Implemented Interfaces:
    java.util.concurrent.CompletionStage<T>, java.util.concurrent.Future<T>

    public final class CancellationPropagatingFuture<T>
    extends java.util.concurrent.CompletableFuture<T>
    A CompletableFuture that propagates cancellation to an upstream when a node in the dependency tree starting from this future is canceled.
    • Nested Class Summary

      • Nested classes/interfaces inherited from class java.util.concurrent.CompletableFuture

        java.util.concurrent.CompletableFuture.AsynchronousCompletionTask
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean cancel​(boolean mayInterruptIfRunning)  
      static <T> CancellationPropagatingFuture<T> create()  
      <U> java.util.concurrent.CompletableFuture<U> newIncompleteFuture()  
      static <T> java.util.concurrent.CompletableFuture<T> of​(java.util.concurrent.CompletableFuture<T> upstream)  
      static <T> java.util.concurrent.CompletionStage<T> of​(java.util.concurrent.CompletionStage<T> upstream)  
      <U> java.util.concurrent.CompletableFuture<U> thenCompose​(java.util.function.Function<? super T,​? extends java.util.concurrent.CompletionStage<U>> fn)  
      <U> java.util.concurrent.CompletableFuture<U> thenComposeAsync​(java.util.function.Function<? super T,​? extends java.util.concurrent.CompletionStage<U>> fn)  
      <U> java.util.concurrent.CompletableFuture<U> thenComposeAsync​(java.util.function.Function<? super T,​? extends java.util.concurrent.CompletionStage<U>> fn, java.util.concurrent.Executor executor)  
      • Methods inherited from class java.util.concurrent.CompletableFuture

        acceptEither, acceptEitherAsync, acceptEitherAsync, allOf, anyOf, applyToEither, applyToEitherAsync, applyToEitherAsync, complete, completeAsync, completeAsync, completedFuture, completedStage, completeExceptionally, completeOnTimeout, copy, defaultExecutor, delayedExecutor, delayedExecutor, exceptionally, failedFuture, failedStage, get, get, getNow, getNumberOfDependents, handle, handleAsync, handleAsync, isCancelled, isCompletedExceptionally, isDone, join, minimalCompletionStage, obtrudeException, obtrudeValue, orTimeout, runAfterBoth, runAfterBothAsync, runAfterBothAsync, runAfterEither, runAfterEitherAsync, runAfterEitherAsync, runAsync, runAsync, supplyAsync, supplyAsync, thenAccept, thenAcceptAsync, thenAcceptAsync, thenAcceptBoth, thenAcceptBothAsync, thenAcceptBothAsync, thenApply, thenApplyAsync, thenApplyAsync, thenCombine, thenCombineAsync, thenCombineAsync, thenRun, thenRunAsync, thenRunAsync, toCompletableFuture, toString, whenComplete, whenCompleteAsync, whenCompleteAsync
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Method Detail

      • newIncompleteFuture

        public <U> java.util.concurrent.CompletableFuture<U> newIncompleteFuture()
        Overrides:
        newIncompleteFuture in class java.util.concurrent.CompletableFuture<T>
      • thenCompose

        public <U> java.util.concurrent.CompletableFuture<U> thenCompose​(java.util.function.Function<? super T,​? extends java.util.concurrent.CompletionStage<U>> fn)
        Specified by:
        thenCompose in interface java.util.concurrent.CompletionStage<T>
        Overrides:
        thenCompose in class java.util.concurrent.CompletableFuture<T>
      • thenComposeAsync

        public <U> java.util.concurrent.CompletableFuture<U> thenComposeAsync​(java.util.function.Function<? super T,​? extends java.util.concurrent.CompletionStage<U>> fn)
        Specified by:
        thenComposeAsync in interface java.util.concurrent.CompletionStage<T>
        Overrides:
        thenComposeAsync in class java.util.concurrent.CompletableFuture<T>
      • thenComposeAsync

        public <U> java.util.concurrent.CompletableFuture<U> thenComposeAsync​(java.util.function.Function<? super T,​? extends java.util.concurrent.CompletionStage<U>> fn,
                                                                              java.util.concurrent.Executor executor)
        Specified by:
        thenComposeAsync in interface java.util.concurrent.CompletionStage<T>
        Overrides:
        thenComposeAsync in class java.util.concurrent.CompletableFuture<T>
      • cancel

        public boolean cancel​(boolean mayInterruptIfRunning)
        Specified by:
        cancel in interface java.util.concurrent.Future<T>
        Overrides:
        cancel in class java.util.concurrent.CompletableFuture<T>
      • of

        public static <T> java.util.concurrent.CompletionStage<T> of​(java.util.concurrent.CompletionStage<T> upstream)
      • of

        public static <T> java.util.concurrent.CompletableFuture<T> of​(java.util.concurrent.CompletableFuture<T> upstream)