CompletionStage<Void> |
CompletionStage.acceptEitherAsync(CompletionStage<? extends T> other,
Consumer<? super T> action,
Executor executor) |
Returns a new CompletionStage that, when either this or the
other given stage complete normally, is executed using the
supplied executor, with the corresponding result as argument to
the supplied action.
|
<U> CompletionStage<U> |
CompletionStage.applyToEitherAsync(CompletionStage<? extends T> other,
Function<? super T,U> fn,
Executor executor) |
Returns a new CompletionStage that, when either this or the
other given stage complete normally, is executed using the
supplied executor, with the corresponding result as argument to
the supplied function.
|
CompletableFuture<T> |
CompletableFuture.completeAsync(Supplier<? extends T> supplier,
Executor executor) |
Completes this CompletableFuture with the result of
the given Supplier function invoked from an asynchronous
task using the given executor.
|
static Executor |
CompletableFuture.delayedExecutor(long delay,
TimeUnit unit,
Executor executor) |
Returns a new Executor that submits a task to the given base
executor after the given delay (or no delay if non-positive).
|
default CompletionStage<T> |
CompletionStage.exceptionallyAsync(Function<Throwable,? extends T> fn,
Executor executor) |
Returns a new CompletionStage that, when this stage completes
exceptionally, is executed with this stage's exception as the
argument to the supplied function, using the supplied Executor.
|
default CompletionStage<T> |
CompletionStage.exceptionallyComposeAsync(Function<Throwable,? extends CompletionStage<T>> fn,
Executor executor) |
Returns a new CompletionStage that, when this stage completes
exceptionally, is composed using the results of the supplied
function applied to this stage's exception, using the
supplied Executor.
|
<U> CompletionStage<U> |
CompletionStage.handleAsync(BiFunction<? super T,Throwable,? extends U> fn,
Executor executor) |
Returns a new CompletionStage that, when this stage completes
either normally or exceptionally, is executed using the
supplied executor, with this stage's result and exception as
arguments to the supplied function.
|
CompletionStage<Void> |
CompletionStage.runAfterBothAsync(CompletionStage<?> other,
Runnable action,
Executor executor) |
Returns a new CompletionStage that, when this and the other
given stage both complete normally, executes the given action
using the supplied executor.
|
CompletionStage<Void> |
CompletionStage.runAfterEitherAsync(CompletionStage<?> other,
Runnable action,
Executor executor) |
Returns a new CompletionStage that, when either this or the
other given stage complete normally, executes the given action
using the supplied executor.
|
static CompletableFuture<Void> |
CompletableFuture.runAsync(Runnable runnable,
Executor executor) |
Returns a new CompletableFuture that is asynchronously completed
by a task running in the given executor after it runs the given
action.
|
static <U> CompletableFuture<U> |
CompletableFuture.supplyAsync(Supplier<U> supplier,
Executor executor) |
Returns a new CompletableFuture that is asynchronously completed
by a task running in the given executor with the value obtained
by calling the given Supplier.
|
CompletionStage<Void> |
CompletionStage.thenAcceptAsync(Consumer<? super T> action,
Executor executor) |
Returns a new CompletionStage that, when this stage completes
normally, is executed using the supplied Executor, with this
stage's result as the argument to the supplied action.
|
<U> CompletionStage<Void> |
CompletionStage.thenAcceptBothAsync(CompletionStage<? extends U> other,
BiConsumer<? super T,? super U> action,
Executor executor) |
Returns a new CompletionStage that, when this and the other
given stage both complete normally, is executed using the
supplied executor, with the two results as arguments to the
supplied action.
|
<U> CompletionStage<U> |
CompletionStage.thenApplyAsync(Function<? super T,? extends U> fn,
Executor executor) |
Returns a new CompletionStage that, when this stage completes
normally, is executed using the supplied Executor, with this
stage's result as the argument to the supplied function.
|
<U,V> CompletionStage<V> |
CompletionStage.thenCombineAsync(CompletionStage<? extends U> other,
BiFunction<? super T,? super U,? extends V> fn,
Executor executor) |
Returns a new CompletionStage that, when this and the other
given stage both complete normally, is executed using the
supplied executor, with the two results as arguments to the
supplied function.
|
<U> CompletionStage<U> |
CompletionStage.thenComposeAsync(Function<? super T,? extends CompletionStage<U>> fn,
Executor executor) |
Returns a new CompletionStage that is completed with the same
value as the CompletionStage returned by the given function,
executed using the supplied Executor.
|
CompletionStage<Void> |
CompletionStage.thenRunAsync(Runnable action,
Executor executor) |
Returns a new CompletionStage that, when this stage completes
normally, executes the given action using the supplied Executor.
|
CompletionStage<T> |
CompletionStage.whenCompleteAsync(BiConsumer<? super T,? super Throwable> action,
Executor executor) |
Returns a new CompletionStage with the same result or exception as
this stage, that executes the given action using the supplied
Executor when this stage completes.
|