static CompletableFuture<Void> |
CompletableFuture.allOf(CompletableFuture<?>... cfs) |
Returns a new CompletableFuture that is completed when all of
the given CompletableFutures complete.
|
static CompletableFuture<Object> |
CompletableFuture.anyOf(CompletableFuture<?>... cfs) |
Returns a new CompletableFuture that is completed when any of
the given CompletableFutures complete, with the same result.
|
CompletableFuture<T> |
CompletableFuture.completeAsync(Supplier<? extends T> supplier) |
Completes this CompletableFuture with the result of the given
Supplier function invoked from an asynchronous task using the
default executor.
|
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 <U> CompletableFuture<U> |
CompletableFuture.completedFuture(U value) |
Returns a new CompletableFuture that is already completed with
the given value.
|
CompletableFuture<T> |
CompletableFuture.completeOnTimeout(T value,
long timeout,
TimeUnit unit) |
Completes this CompletableFuture with the given value if not
otherwise completed before the given timeout.
|
CompletableFuture<Void> |
SubmissionPublisher.consume(Consumer<? super T> consumer) |
Processes all published items using the given Consumer function.
|
CompletableFuture<T> |
CompletableFuture.copy() |
Returns a new CompletableFuture that is completed normally with
the same value as this CompletableFuture when it completes
normally.
|
CompletableFuture<T> |
CompletableFuture.exceptionally(Function<Throwable,? extends T> fn) |
Returns a new CompletableFuture that is completed when this
CompletableFuture completes, with the result of the given
function of the exception triggering this CompletableFuture's
completion when it completes exceptionally; otherwise, if this
CompletableFuture completes normally, then the returned
CompletableFuture also completes normally with the same value.
|
static <U> CompletableFuture<U> |
CompletableFuture.failedFuture(Throwable ex) |
Returns a new CompletableFuture that is already completed
exceptionally with the given exception.
|
<U> CompletableFuture<U> |
CompletableFuture.newIncompleteFuture() |
Returns a new incomplete CompletableFuture of the type to be
returned by a CompletionStage method.
|
CompletableFuture<T> |
CompletableFuture.orTimeout(long timeout,
TimeUnit unit) |
Exceptionally completes this CompletableFuture with
a TimeoutException if not otherwise completed
before the given timeout.
|
static CompletableFuture<Void> |
CompletableFuture.runAsync(Runnable runnable) |
Returns a new CompletableFuture that is asynchronously completed
by a task running in the ForkJoinPool.commonPool() after
it runs the given action.
|
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) |
Returns a new CompletableFuture that is asynchronously completed
by a task running in the ForkJoinPool.commonPool() with
the value obtained by calling the given Supplier.
|
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.
|
CompletableFuture<T> |
CompletableFuture.toCompletableFuture() |
Returns this CompletableFuture.
|
CompletableFuture<T> |
CompletionStage.toCompletableFuture() |
Returns a CompletableFuture maintaining the same
completion properties as this stage.
|