Module methanol
Class CancellationPropagatingFuture<T>
- java.lang.Object
-
- java.util.concurrent.CompletableFuture<T>
-
- com.github.mizosoft.methanol.internal.concurrent.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>ACompletableFuturethat propagates cancellation to an upstream when a node in the dependency tree starting from this future is canceled.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancancel(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
-
-
-
-
Method Detail
-
newIncompleteFuture
public <U> java.util.concurrent.CompletableFuture<U> newIncompleteFuture()
- Overrides:
newIncompleteFuturein classjava.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)
-
thenComposeAsync
public <U> java.util.concurrent.CompletableFuture<U> thenComposeAsync(java.util.function.Function<? super T,? extends java.util.concurrent.CompletionStage<U>> fn)
-
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)
-
cancel
public boolean cancel(boolean mayInterruptIfRunning)
-
create
public static <T> CancellationPropagatingFuture<T> create()
-
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)
-
-