public class ContextAwareCompletableFuture<T>
extends java.util.concurrent.CompletableFuture<T>
CompletableFuture that was introduced in java version 8.
The class is a 'normal' Completable Future, but every successive call made on the result will be made within the
context during creation of this ContextAwareCompletableFuture.
| Constructor | Description |
|---|---|
ContextAwareCompletableFuture() |
Creates a new
ContextSnapshot and remembers that in this completable future,
running all completion methods within this snapshot. |
ContextAwareCompletableFuture(ContextSnapshot snapshot) |
Creates a new
CompletableFuture where all completion methods are run within the specified
snapshot context. |
| Modifier and Type | Method | Description |
|---|---|---|
ContextAwareCompletableFuture<java.lang.Void> |
acceptEither(java.util.concurrent.CompletionStage<? extends T> other,
java.util.function.Consumer<? super T> action) |
|
ContextAwareCompletableFuture<java.lang.Void> |
acceptEitherAsync(java.util.concurrent.CompletionStage<? extends T> other,
java.util.function.Consumer<? super T> action) |
|
ContextAwareCompletableFuture<java.lang.Void> |
acceptEitherAsync(java.util.concurrent.CompletionStage<? extends T> other,
java.util.function.Consumer<? super T> action,
java.util.concurrent.Executor executor) |
|
static ContextAwareCompletableFuture<java.lang.Void> |
allOf(java.util.concurrent.CompletableFuture<?>... cfs) |
Returns a new CompletableFuture that is completed when all of
the given CompletableFutures complete.
|
static ContextAwareCompletableFuture<java.lang.Void> |
allOf(ContextSnapshot snapshot,
java.util.concurrent.CompletableFuture<?>... cfs) |
Returns a new CompletableFuture that is completed when all of
the given CompletableFutures complete.
|
static ContextAwareCompletableFuture<java.lang.Object> |
anyOf(java.util.concurrent.CompletableFuture<?>... cfs) |
Returns a new CompletableFuture that is completed when any of
the given CompletableFutures complete, with the same result.
|
static ContextAwareCompletableFuture<java.lang.Object> |
anyOf(ContextSnapshot snapshot,
java.util.concurrent.CompletableFuture<?>... cfs) |
Returns a new CompletableFuture that is completed when any of
the given CompletableFutures complete, with the same result.
|
<U> ContextAwareCompletableFuture<U> |
applyToEither(java.util.concurrent.CompletionStage<? extends T> other,
java.util.function.Function<? super T,U> fn) |
|
<U> ContextAwareCompletableFuture<U> |
applyToEitherAsync(java.util.concurrent.CompletionStage<? extends T> other,
java.util.function.Function<? super T,U> fn) |
|
<U> ContextAwareCompletableFuture<U> |
applyToEitherAsync(java.util.concurrent.CompletionStage<? extends T> other,
java.util.function.Function<? super T,U> fn,
java.util.concurrent.Executor executor) |
|
static <U> ContextAwareCompletableFuture<U> |
completedFuture(U value) |
Creates a new
ContextAwareCompletableFuture from the already-completed value. |
static <U> ContextAwareCompletableFuture<U> |
completedFuture(U value,
ContextSnapshot snapshot) |
Creates a new
ContextAwareCompletableFuture from the already-completed value. |
static <U> java.util.concurrent.CompletionStage<U> |
completedStage(U value) |
Creates a new
CompletionStage from the already-completed value. |
ContextAwareCompletableFuture<T> |
exceptionally(java.util.function.Function<java.lang.Throwable,? extends T> fn) |
|
static <U> ContextAwareCompletableFuture<U> |
failedFuture(java.lang.Throwable ex) |
Creates a new
ContextAwareCompletableFuture that is already completed
exceptionally with the given exception. |
static <U> ContextAwareCompletableFuture<U> |
failedFuture(java.lang.Throwable ex,
ContextSnapshot snapshot) |
Creates a new
ContextAwareCompletableFuture that is already completed
exceptionally with the given exception. |
static <U> java.util.concurrent.CompletionStage<U> |
failedStage(java.lang.Throwable ex) |
Creates a new
CompletionStage that is already completed
exceptionally with the given exception. |
<U> ContextAwareCompletableFuture<U> |
handle(java.util.function.BiFunction<? super T,java.lang.Throwable,? extends U> fn) |
|
<U> ContextAwareCompletableFuture<U> |
handleAsync(java.util.function.BiFunction<? super T,java.lang.Throwable,? extends U> fn) |
|
<U> ContextAwareCompletableFuture<U> |
handleAsync(java.util.function.BiFunction<? super T,java.lang.Throwable,? extends U> fn,
java.util.concurrent.Executor executor) |
|
ContextAwareCompletableFuture<java.lang.Void> |
runAfterBoth(java.util.concurrent.CompletionStage<?> other,
java.lang.Runnable action) |
|
ContextAwareCompletableFuture<java.lang.Void> |
runAfterBothAsync(java.util.concurrent.CompletionStage<?> other,
java.lang.Runnable action) |
|
ContextAwareCompletableFuture<java.lang.Void> |
runAfterBothAsync(java.util.concurrent.CompletionStage<?> other,
java.lang.Runnable action,
java.util.concurrent.Executor executor) |
|
ContextAwareCompletableFuture<java.lang.Void> |
runAfterEither(java.util.concurrent.CompletionStage<?> other,
java.lang.Runnable action) |
|
ContextAwareCompletableFuture<java.lang.Void> |
runAfterEitherAsync(java.util.concurrent.CompletionStage<?> other,
java.lang.Runnable action) |
|
ContextAwareCompletableFuture<java.lang.Void> |
runAfterEitherAsync(java.util.concurrent.CompletionStage<?> other,
java.lang.Runnable action,
java.util.concurrent.Executor executor) |
|
static ContextAwareCompletableFuture<java.lang.Void> |
runAsync(java.lang.Runnable runnable) |
Runs the
runnable task in the common ForkJoinPool
within the current context and also applies that context to all successive
calls to the CompletableFuture. |
static ContextAwareCompletableFuture<java.lang.Void> |
runAsync(java.lang.Runnable runnable,
java.util.concurrent.Executor executor) |
Runs the
runnable task in the specified executor
within the current context and also applies that context to all successive
calls to the CompletableFuture. |
static ContextAwareCompletableFuture<java.lang.Void> |
runAsync(java.lang.Runnable runnable,
java.util.concurrent.Executor executor,
ContextSnapshot snapshot) |
Runs the
runnable task in the specified executor
within the specified context snapshot and also applies that context
to all successive calls to the CompletableFuture. |
static ContextAwareCompletableFuture<java.lang.Void> |
runAsync(java.lang.Runnable runnable,
java.util.concurrent.Executor executor,
ContextSnapshot snapshot,
boolean takeNewSnapshot) |
Runs the
runnable task in the specified executor
within the specified context snapshot and also applies that context
to all successive calls to the CompletableFuture. |
static <U> ContextAwareCompletableFuture<U> |
supplyAsync(java.util.function.Supplier<U> supplier) |
Runs the
supplier task in the common ForkJoinPool
within the current context and also applies that context to all successive
calls to the CompletableFuture. |
static <U> ContextAwareCompletableFuture<U> |
supplyAsync(java.util.function.Supplier<U> supplier,
java.util.concurrent.Executor executor) |
Runs the
supplier task in the specified executor
within the current context and also applies that context to all successive
calls to the CompletableFuture. |
static <U> ContextAwareCompletableFuture<U> |
supplyAsync(java.util.function.Supplier<U> supplier,
java.util.concurrent.Executor executor,
ContextSnapshot snapshot) |
Runs the
supplier task in the specified executor
within the specified context snapshot and also applies that context
to all successive calls to the CompletableFuture. |
static <U> ContextAwareCompletableFuture<U> |
supplyAsync(java.util.function.Supplier<U> supplier,
java.util.concurrent.Executor executor,
ContextSnapshot snapshot,
boolean takeNewSnapshot) |
Runs the
supplier task in the specified executor
within the specified context snapshot and also applies that context
to all successive calls to the CompletableFuture. |
ContextAwareCompletableFuture<T> |
takeNewSnapshot() |
Returns a context-aware CompletableFuture that takes a new snapshot after each completion stage.
|
ContextAwareCompletableFuture<T> |
takeNewSnapshot(boolean takeSnapshot) |
Returns a context-aware CompletableFuture that may take a new snapshot after each completion stage.
|
ContextAwareCompletableFuture<java.lang.Void> |
thenAccept(java.util.function.Consumer<? super T> action) |
|
ContextAwareCompletableFuture<java.lang.Void> |
thenAcceptAsync(java.util.function.Consumer<? super T> action) |
|
ContextAwareCompletableFuture<java.lang.Void> |
thenAcceptAsync(java.util.function.Consumer<? super T> action,
java.util.concurrent.Executor executor) |
|
<U> ContextAwareCompletableFuture<java.lang.Void> |
thenAcceptBoth(java.util.concurrent.CompletionStage<? extends U> other,
java.util.function.BiConsumer<? super T,? super U> action) |
|
<U> ContextAwareCompletableFuture<java.lang.Void> |
thenAcceptBothAsync(java.util.concurrent.CompletionStage<? extends U> other,
java.util.function.BiConsumer<? super T,? super U> action) |
|
<U> ContextAwareCompletableFuture<java.lang.Void> |
thenAcceptBothAsync(java.util.concurrent.CompletionStage<? extends U> other,
java.util.function.BiConsumer<? super T,? super U> action,
java.util.concurrent.Executor executor) |
|
<U> ContextAwareCompletableFuture<U> |
thenApply(java.util.function.Function<? super T,? extends U> fn) |
|
<U> ContextAwareCompletableFuture<U> |
thenApplyAsync(java.util.function.Function<? super T,? extends U> fn) |
|
<U> ContextAwareCompletableFuture<U> |
thenApplyAsync(java.util.function.Function<? super T,? extends U> fn,
java.util.concurrent.Executor executor) |
|
<U,V> ContextAwareCompletableFuture<V> |
thenCombine(java.util.concurrent.CompletionStage<? extends U> other,
java.util.function.BiFunction<? super T,? super U,? extends V> fn) |
|
<U,V> ContextAwareCompletableFuture<V> |
thenCombineAsync(java.util.concurrent.CompletionStage<? extends U> other,
java.util.function.BiFunction<? super T,? super U,? extends V> fn) |
|
<U,V> ContextAwareCompletableFuture<V> |
thenCombineAsync(java.util.concurrent.CompletionStage<? extends U> other,
java.util.function.BiFunction<? super T,? super U,? extends V> fn,
java.util.concurrent.Executor executor) |
|
<U> ContextAwareCompletableFuture<U> |
thenCompose(java.util.function.Function<? super T,? extends java.util.concurrent.CompletionStage<U>> fn) |
|
<U> ContextAwareCompletableFuture<U> |
thenComposeAsync(java.util.function.Function<? super T,? extends java.util.concurrent.CompletionStage<U>> fn) |
|
<U> ContextAwareCompletableFuture<U> |
thenComposeAsync(java.util.function.Function<? super T,? extends java.util.concurrent.CompletionStage<U>> fn,
java.util.concurrent.Executor executor) |
|
ContextAwareCompletableFuture<java.lang.Void> |
thenRun(java.lang.Runnable action) |
|
java.util.concurrent.CompletableFuture<java.lang.Void> |
thenRunAsync(java.lang.Runnable action) |
|
ContextAwareCompletableFuture<java.lang.Void> |
thenRunAsync(java.lang.Runnable action,
java.util.concurrent.Executor executor) |
|
ContextAwareCompletableFuture<T> |
whenComplete(java.util.function.BiConsumer<? super T,? super java.lang.Throwable> action) |
|
ContextAwareCompletableFuture<T> |
whenCompleteAsync(java.util.function.BiConsumer<? super T,? super java.lang.Throwable> action) |
|
ContextAwareCompletableFuture<T> |
whenCompleteAsync(java.util.function.BiConsumer<? super T,? super java.lang.Throwable> action,
java.util.concurrent.Executor executor) |
cancel, complete, completeAsync, completeAsync, completeExceptionally, completeOnTimeout, copy, defaultExecutor, delayedExecutor, delayedExecutor, get, get, getNow, getNumberOfDependents, isCancelled, isCompletedExceptionally, isDone, join, minimalCompletionStage, newIncompleteFuture, obtrudeException, obtrudeValue, orTimeout, toCompletableFuture, toStringpublic ContextAwareCompletableFuture()
ContextSnapshot and remembers that in this completable future,
running all completion methods within this snapshot.ContextManagers.createContextSnapshot()public ContextAwareCompletableFuture(ContextSnapshot snapshot)
CompletableFuture where all completion methods are run within the specified
snapshot context.snapshot - the snapshot to run completion methods in.
Optional, the completable future will take a new snaphot if null is provided.ContextManagers.createContextSnapshot()public static <U> ContextAwareCompletableFuture<U> supplyAsync(java.util.function.Supplier<U> supplier)
supplier task in the common ForkJoinPool
within the current context and also applies that context to all successive
calls to the CompletableFuture.U - the function's return typesupplier - a function to be performed asynchronously returning the result of the CompletableFutureCompletableFuture.supplyAsync(Supplier),
supplyAsync(Supplier, Executor, ContextSnapshot, boolean)public static <U> ContextAwareCompletableFuture<U> supplyAsync(java.util.function.Supplier<U> supplier, java.util.concurrent.Executor executor)
supplier task in the specified executor
within the current context and also applies that context to all successive
calls to the CompletableFuture.U - the function's return typesupplier - a function returning the value to be used to complete the returned CompletableFutureexecutor - the executor to use for asynchronous executionCompletableFuture.supplyAsync(Supplier, Executor),
supplyAsync(Supplier, Executor, ContextSnapshot, boolean)public static <U> ContextAwareCompletableFuture<U> supplyAsync(java.util.function.Supplier<U> supplier, java.util.concurrent.Executor executor, ContextSnapshot snapshot)
supplier task in the specified executor
within the specified context snapshot and also applies that context
to all successive calls to the CompletableFuture.
This method is lenient to null values for executor and snapshot:
If executor == null the common ForkJoinPool is used as
specified by CompletableFuture.supplyAsync(Supplier).
If snapshot == null a new context snapshot is
created for the Supplier (if not already a SupplierWithContext).
U - the function's return typesupplier - a function returning the value to be used to complete the returned CompletableFutureexecutor - the executor to use for asynchronous executionsnapshot - a snapshot of the context to be propagated in the supplier function
and all successive calls of this completable futureCompletableFuture.supplyAsync(Supplier, Executor),
supplyAsync(Supplier, Executor, ContextSnapshot, boolean)public static <U> ContextAwareCompletableFuture<U> supplyAsync(java.util.function.Supplier<U> supplier, java.util.concurrent.Executor executor, ContextSnapshot snapshot, boolean takeNewSnapshot)
supplier task in the specified executor
within the specified context snapshot and also applies that context
to all successive calls to the CompletableFuture.
This method is lenient to null values for executor and snapshot:
If executor == null the common ForkJoinPool is used as
specified by CompletableFuture.supplyAsync(Supplier).
If snapshot == null a new context snapshot is
created for the Supplier (if not already a SupplierWithContext).
U - the function's return typesupplier - a function returning the value to be used to complete the returned CompletableFutureexecutor - the executor to use for asynchronous executionsnapshot - a snapshot of the context to be propagated in the supplier function
and all successive calls of this completable futuretakeNewSnapshot - whether or not a new ContextSnapshot should be taken after the supplier function is done.
If false, the snapshot from the caller propagate to all following completion stages.
If true, a new snapshot is taken after each completion stage to propagate into the next.CompletableFuture.supplyAsync(Supplier, Executor)public static ContextAwareCompletableFuture<java.lang.Void> runAsync(java.lang.Runnable runnable)
runnable task in the common ForkJoinPool
within the current context and also applies that context to all successive
calls to the CompletableFuture.runnable - the action to run before completing the returned CompletableFutureCompletableFuture.runAsync(Runnable),
runAsync(Runnable, Executor, ContextSnapshot, boolean)public static ContextAwareCompletableFuture<java.lang.Void> runAsync(java.lang.Runnable runnable, java.util.concurrent.Executor executor)
runnable task in the specified executor
within the current context and also applies that context to all successive
calls to the CompletableFuture.runnable - the action to run before completing the returned CompletableFutureexecutor - the executor to use for asynchronous executionCompletableFuture.runAsync(Runnable, Executor),
runAsync(Runnable, Executor, ContextSnapshot, boolean)public static ContextAwareCompletableFuture<java.lang.Void> runAsync(java.lang.Runnable runnable, java.util.concurrent.Executor executor, ContextSnapshot snapshot)
runnable task in the specified executor
within the specified context snapshot and also applies that context
to all successive calls to the CompletableFuture.
This method is lenient to null values for executor and snapshot:
If executor == null the common ForkJoinPool is used as
specified by CompletableFuture.supplyAsync(Supplier).
If snapshot == null a new context snapshot is
created for the Supplier (if not already a SupplierWithContext).
runnable - the action to run before completing the returned CompletableFutureexecutor - the executor to use for asynchronous executionsnapshot - the context snapshot to apply to the runnable actionCompletableFuture.runAsync(Runnable, Executor),
runAsync(Runnable, Executor, ContextSnapshot, boolean)public static ContextAwareCompletableFuture<java.lang.Void> runAsync(java.lang.Runnable runnable, java.util.concurrent.Executor executor, ContextSnapshot snapshot, boolean takeNewSnapshot)
runnable task in the specified executor
within the specified context snapshot and also applies that context
to all successive calls to the CompletableFuture.
This method is lenient to null values for executor and snapshot:
If executor == null the common ForkJoinPool is used as
specified by CompletableFuture.supplyAsync(Supplier).
If snapshot == null a new context snapshot is
created for the Supplier (if not already a SupplierWithContext).
runnable - the action to run before completing the returned CompletableFutureexecutor - the executor to use for asynchronous executionsnapshot - the context snapshot to apply to the runnable actiontakeNewSnapshot - whether or not a new ContextSnapshot should be taken after the supplier function is done.
If false, the snapshot from the caller propagate to all following completion stages.
If true, a new snapshot is taken after each completion stage to propagate into the next.CompletableFuture.runAsync(Runnable, Executor)public static <U> ContextAwareCompletableFuture<U> completedFuture(U value)
ContextAwareCompletableFuture from the already-completed value.
A new ContextSnapshot is taken and applied to all
following completion stages.U - the type of the valuevalue - the value to return from the already-completed future.ContextAwareCompletableFuture returning the completed value
and containing a new ContextSnapshot.completedFuture(Object, ContextSnapshot)public static <U> ContextAwareCompletableFuture<U> completedFuture(U value, ContextSnapshot snapshot)
ContextAwareCompletableFuture from the already-completed value.
A new ContextSnapshot is taken and applied to all
following completion stages.U - the type of the valuevalue - the value to return from the already-completed future.snapshot - the context snapshot to apply to following completion stages
(optional, specify null to take a new snapshot)ContextAwareCompletableFuture returning the completed value
and containing the specified ContextSnapshot.public static <U> java.util.concurrent.CompletionStage<U> completedStage(U value)
CompletionStage from the already-completed value.
A new ContextSnapshot is taken and applied to all
following completion stages.U - the type of the valuevalue - the value to return from the already-completed stage.CompletionStage returning the completed value
and containing a new ContextSnapshot.completedFuture(Object, ContextSnapshot)public static <U> ContextAwareCompletableFuture<U> failedFuture(java.lang.Throwable ex)
ContextAwareCompletableFuture that is already completed
exceptionally with the given exception.
A new ContextSnapshot is taken and applied to all
following completion stages.U - the type of the valueex - the exceptionContextAwareCompletableFuture throwing the exception
and containing a new ContextSnapshot.failedFuture(Throwable, ContextSnapshot)public static <U> ContextAwareCompletableFuture<U> failedFuture(java.lang.Throwable ex, ContextSnapshot snapshot)
ContextAwareCompletableFuture that is already completed
exceptionally with the given exception.
The specified snapshot is applied to all
following completion stages.U - the type of the valueex - the exceptionsnapshot - the context snapshot to apply to following completion stages
(optional, specify null to take a new snapshot)ContextAwareCompletableFuture throwing the exception
and containing the specified snapshot.public static <U> java.util.concurrent.CompletionStage<U> failedStage(java.lang.Throwable ex)
CompletionStage that is already completed
exceptionally with the given exception.
A new ContextSnapshot is taken and applied to all
following completion stages.U - the type of the valueex - the exceptionCompletionStage throwing the exception
and containing a new ContextSnapshot.failedFuture(Throwable, ContextSnapshot)public static ContextAwareCompletableFuture<java.lang.Void> allOf(java.util.concurrent.CompletableFuture<?>... cfs)
null.
Among the applications of this method is to await completion
of a set of independent CompletableFutures before continuing a
program, as in: CompletableFuture.allOf(c1, c2,
c3).join();.
A new ContextSnapshot is taken and applied to all following completion stages.
cfs - the CompletableFuturesContextAwareCompletableFuture that is completed when all of the
given CompletableFutures completejava.lang.NullPointerException - if the array or any of its elements are nullpublic static ContextAwareCompletableFuture<java.lang.Void> allOf(ContextSnapshot snapshot, java.util.concurrent.CompletableFuture<?>... cfs)
null.
Among the applications of this method is to await completion
of a set of independent CompletableFutures before continuing a
program, as in: CompletableFuture.allOf(c1, c2,
c3).join();.
The specified ContextSnapshot is applied to all following completion stages.
snapshot - the context snapshot to apply to following completion stages
(optional, specify null to take a new snapshot)cfs - the CompletableFuturesContextAwareCompletableFuture that is completed when all of the
given CompletableFutures completejava.lang.NullPointerException - if the array or any of its elements are nullpublic static ContextAwareCompletableFuture<java.lang.Object> anyOf(java.util.concurrent.CompletableFuture<?>... cfs)
A new ContextSnapshot is taken and applied to all following completion stages.
cfs - the CompletableFuturesjava.lang.NullPointerException - if the array or any of its elements are nullpublic static ContextAwareCompletableFuture<java.lang.Object> anyOf(ContextSnapshot snapshot, java.util.concurrent.CompletableFuture<?>... cfs)
The specified ContextSnapshot is applied to all following completion stages.
snapshot - the context snapshot to apply to following completion stages
(optional, specify null to take a new snapshot)cfs - the CompletableFuturesjava.lang.NullPointerException - if the array or any of its elements are nullpublic ContextAwareCompletableFuture<T> takeNewSnapshot()
This means that after each then..., run..., apply... method,
after calling the function, a new context snapshot is taken for follow-up calls.
Only use this when chaining completable futures where the completion stages may update contextual values.
Warning: This may result in unnecessary context snapshots being taken.
CompletionStagepublic ContextAwareCompletableFuture<T> takeNewSnapshot(boolean takeSnapshot)
This means that after each then..., run..., apply... method,
after calling the function, a new context snapshot is taken for follow-up calls.
Only set this to true when chaining completable futures where the completion stages
may update contextual values.
Warning: This may result in unnecessary context snapshots being taken.
takeSnapshot - whether or not new context snapshots must be taken after each completion stage.takeSnapshot is true.CompletionStagepublic <U> ContextAwareCompletableFuture<U> thenApply(java.util.function.Function<? super T,? extends U> fn)
thenApply in class java.util.concurrent.CompletableFuture<T>public <U> ContextAwareCompletableFuture<U> thenApplyAsync(java.util.function.Function<? super T,? extends U> fn)
thenApplyAsync in class java.util.concurrent.CompletableFuture<T>public <U> ContextAwareCompletableFuture<U> thenApplyAsync(java.util.function.Function<? super T,? extends U> fn, java.util.concurrent.Executor executor)
thenApplyAsync in class java.util.concurrent.CompletableFuture<T>public ContextAwareCompletableFuture<java.lang.Void> thenAccept(java.util.function.Consumer<? super T> action)
thenAccept in class java.util.concurrent.CompletableFuture<T>public ContextAwareCompletableFuture<java.lang.Void> thenAcceptAsync(java.util.function.Consumer<? super T> action)
thenAcceptAsync in class java.util.concurrent.CompletableFuture<T>public ContextAwareCompletableFuture<java.lang.Void> thenAcceptAsync(java.util.function.Consumer<? super T> action, java.util.concurrent.Executor executor)
thenAcceptAsync in class java.util.concurrent.CompletableFuture<T>public ContextAwareCompletableFuture<java.lang.Void> thenRun(java.lang.Runnable action)
thenRun in class java.util.concurrent.CompletableFuture<T>public java.util.concurrent.CompletableFuture<java.lang.Void> thenRunAsync(java.lang.Runnable action)
thenRunAsync in class java.util.concurrent.CompletableFuture<T>public ContextAwareCompletableFuture<java.lang.Void> thenRunAsync(java.lang.Runnable action, java.util.concurrent.Executor executor)
thenRunAsync in class java.util.concurrent.CompletableFuture<T>public <U,V> ContextAwareCompletableFuture<V> thenCombine(java.util.concurrent.CompletionStage<? extends U> other, java.util.function.BiFunction<? super T,? super U,? extends V> fn)
thenCombine in class java.util.concurrent.CompletableFuture<T>public <U,V> ContextAwareCompletableFuture<V> thenCombineAsync(java.util.concurrent.CompletionStage<? extends U> other, java.util.function.BiFunction<? super T,? super U,? extends V> fn)
thenCombineAsync in class java.util.concurrent.CompletableFuture<T>public <U,V> ContextAwareCompletableFuture<V> thenCombineAsync(java.util.concurrent.CompletionStage<? extends U> other, java.util.function.BiFunction<? super T,? super U,? extends V> fn, java.util.concurrent.Executor executor)
thenCombineAsync in class java.util.concurrent.CompletableFuture<T>public <U> ContextAwareCompletableFuture<java.lang.Void> thenAcceptBoth(java.util.concurrent.CompletionStage<? extends U> other, java.util.function.BiConsumer<? super T,? super U> action)
thenAcceptBoth in class java.util.concurrent.CompletableFuture<T>public <U> ContextAwareCompletableFuture<java.lang.Void> thenAcceptBothAsync(java.util.concurrent.CompletionStage<? extends U> other, java.util.function.BiConsumer<? super T,? super U> action)
thenAcceptBothAsync in class java.util.concurrent.CompletableFuture<T>public <U> ContextAwareCompletableFuture<java.lang.Void> thenAcceptBothAsync(java.util.concurrent.CompletionStage<? extends U> other, java.util.function.BiConsumer<? super T,? super U> action, java.util.concurrent.Executor executor)
thenAcceptBothAsync in class java.util.concurrent.CompletableFuture<T>public ContextAwareCompletableFuture<java.lang.Void> runAfterBoth(java.util.concurrent.CompletionStage<?> other, java.lang.Runnable action)
runAfterBoth in class java.util.concurrent.CompletableFuture<T>public ContextAwareCompletableFuture<java.lang.Void> runAfterBothAsync(java.util.concurrent.CompletionStage<?> other, java.lang.Runnable action)
runAfterBothAsync in class java.util.concurrent.CompletableFuture<T>public ContextAwareCompletableFuture<java.lang.Void> runAfterBothAsync(java.util.concurrent.CompletionStage<?> other, java.lang.Runnable action, java.util.concurrent.Executor executor)
runAfterBothAsync in class java.util.concurrent.CompletableFuture<T>public <U> ContextAwareCompletableFuture<U> applyToEither(java.util.concurrent.CompletionStage<? extends T> other, java.util.function.Function<? super T,U> fn)
applyToEither in class java.util.concurrent.CompletableFuture<T>public <U> ContextAwareCompletableFuture<U> applyToEitherAsync(java.util.concurrent.CompletionStage<? extends T> other, java.util.function.Function<? super T,U> fn)
applyToEitherAsync in class java.util.concurrent.CompletableFuture<T>public <U> ContextAwareCompletableFuture<U> applyToEitherAsync(java.util.concurrent.CompletionStage<? extends T> other, java.util.function.Function<? super T,U> fn, java.util.concurrent.Executor executor)
applyToEitherAsync in class java.util.concurrent.CompletableFuture<T>public ContextAwareCompletableFuture<java.lang.Void> acceptEither(java.util.concurrent.CompletionStage<? extends T> other, java.util.function.Consumer<? super T> action)
acceptEither in class java.util.concurrent.CompletableFuture<T>public ContextAwareCompletableFuture<java.lang.Void> acceptEitherAsync(java.util.concurrent.CompletionStage<? extends T> other, java.util.function.Consumer<? super T> action)
acceptEitherAsync in class java.util.concurrent.CompletableFuture<T>public ContextAwareCompletableFuture<java.lang.Void> acceptEitherAsync(java.util.concurrent.CompletionStage<? extends T> other, java.util.function.Consumer<? super T> action, java.util.concurrent.Executor executor)
acceptEitherAsync in class java.util.concurrent.CompletableFuture<T>public ContextAwareCompletableFuture<java.lang.Void> runAfterEither(java.util.concurrent.CompletionStage<?> other, java.lang.Runnable action)
runAfterEither in class java.util.concurrent.CompletableFuture<T>public ContextAwareCompletableFuture<java.lang.Void> runAfterEitherAsync(java.util.concurrent.CompletionStage<?> other, java.lang.Runnable action)
runAfterEitherAsync in class java.util.concurrent.CompletableFuture<T>public ContextAwareCompletableFuture<java.lang.Void> runAfterEitherAsync(java.util.concurrent.CompletionStage<?> other, java.lang.Runnable action, java.util.concurrent.Executor executor)
runAfterEitherAsync in class java.util.concurrent.CompletableFuture<T>public <U> ContextAwareCompletableFuture<U> thenCompose(java.util.function.Function<? super T,? extends java.util.concurrent.CompletionStage<U>> fn)
thenCompose in class java.util.concurrent.CompletableFuture<T>public <U> ContextAwareCompletableFuture<U> thenComposeAsync(java.util.function.Function<? super T,? extends java.util.concurrent.CompletionStage<U>> fn)
thenComposeAsync in class java.util.concurrent.CompletableFuture<T>public <U> ContextAwareCompletableFuture<U> thenComposeAsync(java.util.function.Function<? super T,? extends java.util.concurrent.CompletionStage<U>> fn, java.util.concurrent.Executor executor)
thenComposeAsync in class java.util.concurrent.CompletableFuture<T>public ContextAwareCompletableFuture<T> whenComplete(java.util.function.BiConsumer<? super T,? super java.lang.Throwable> action)
whenComplete in class java.util.concurrent.CompletableFuture<T>public ContextAwareCompletableFuture<T> whenCompleteAsync(java.util.function.BiConsumer<? super T,? super java.lang.Throwable> action)
whenCompleteAsync in class java.util.concurrent.CompletableFuture<T>public ContextAwareCompletableFuture<T> whenCompleteAsync(java.util.function.BiConsumer<? super T,? super java.lang.Throwable> action, java.util.concurrent.Executor executor)
whenCompleteAsync in class java.util.concurrent.CompletableFuture<T>public <U> ContextAwareCompletableFuture<U> handle(java.util.function.BiFunction<? super T,java.lang.Throwable,? extends U> fn)
handle in class java.util.concurrent.CompletableFuture<T>public <U> ContextAwareCompletableFuture<U> handleAsync(java.util.function.BiFunction<? super T,java.lang.Throwable,? extends U> fn)
handleAsync in class java.util.concurrent.CompletableFuture<T>public <U> ContextAwareCompletableFuture<U> handleAsync(java.util.function.BiFunction<? super T,java.lang.Throwable,? extends U> fn, java.util.concurrent.Executor executor)
handleAsync in class java.util.concurrent.CompletableFuture<T>public ContextAwareCompletableFuture<T> exceptionally(java.util.function.Function<java.lang.Throwable,? extends T> fn)
exceptionally in class java.util.concurrent.CompletableFuture<T>Copyright © 2016–2019 Talsma ICT. All rights reserved.