| 程序包 | 说明 |
|---|---|
| com.jn.langx.util.concurrent.completion |
| 限定符和类型 | 方法和说明 |
|---|---|
CompletableFuture<Void> |
CompletableFuture.acceptEither(CompletionStep<? extends T> other,
Consumer<? super T> action) |
CompletableFuture<Void> |
CompletableFuture.acceptEitherAsync(CompletionStep<? extends T> other,
Consumer<? super T> action) |
CompletableFuture<Void> |
CompletableFuture.acceptEitherAsync(CompletionStep<? extends T> other,
Consumer<? super T> action,
Executor executor) |
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.
|
<U> CompletableFuture<U> |
CompletableFuture.applyToEither(CompletionStep<? extends T> other,
Function<? super T,U> fn) |
<U> CompletableFuture<U> |
CompletableFuture.applyToEitherAsync(CompletionStep<? extends T> other,
Function<? super T,U> fn) |
<U> CompletableFuture<U> |
CompletableFuture.applyToEitherAsync(CompletionStep<? extends T> other,
Function<? super T,U> fn,
Executor executor) |
static <U> CompletableFuture<U> |
CompletableFuture.completedFuture(U value)
Returns a new CompletableFuture that is already completed with
the given value.
|
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.
|
<U> CompletableFuture<U> |
CompletableFuture.handle(Function2<? super T,Throwable,? extends U> fn) |
<U> CompletableFuture<U> |
CompletableFuture.handleAsync(Function2<? super T,Throwable,? extends U> fn) |
<U> CompletableFuture<U> |
CompletableFuture.handleAsync(Function2<? super T,Throwable,? extends U> fn,
Executor executor) |
CompletableFuture<Void> |
CompletableFuture.runAfterBoth(CompletionStep<?> other,
Runnable action) |
CompletableFuture<Void> |
CompletableFuture.runAfterBothAsync(CompletionStep<?> other,
Runnable action) |
CompletableFuture<Void> |
CompletableFuture.runAfterBothAsync(CompletionStep<?> other,
Runnable action,
Executor executor) |
CompletableFuture<Void> |
CompletableFuture.runAfterEither(CompletionStep<?> other,
Runnable action) |
CompletableFuture<Void> |
CompletableFuture.runAfterEitherAsync(CompletionStep<?> other,
Runnable action) |
CompletableFuture<Void> |
CompletableFuture.runAfterEitherAsync(CompletionStep<?> other,
Runnable action,
Executor executor) |
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(Supplier0<U> supplier0)
Returns a new CompletableFuture that is asynchronously completed
by a task running in the { ForkJoinPool#commonPool()} with
the value obtained by calling the given Supplier0.
|
static <U> CompletableFuture<U> |
CompletableFuture.supplyAsync(Supplier0<U> supplier0,
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 Supplier0.
|
CompletableFuture<Void> |
CompletableFuture.thenAccept(Consumer<? super T> action) |
CompletableFuture<Void> |
CompletableFuture.thenAcceptAsync(Consumer<? super T> action) |
CompletableFuture<Void> |
CompletableFuture.thenAcceptAsync(Consumer<? super T> action,
Executor executor) |
<U> CompletableFuture<Void> |
CompletableFuture.thenAcceptBoth(CompletionStep<? extends U> other,
Consumer2<? super T,? super U> action) |
<U> CompletableFuture<Void> |
CompletableFuture.thenAcceptBothAsync(CompletionStep<? extends U> other,
Consumer2<? super T,? super U> action) |
<U> CompletableFuture<Void> |
CompletableFuture.thenAcceptBothAsync(CompletionStep<? extends U> other,
Consumer2<? super T,? super U> action,
Executor executor) |
<U> CompletableFuture<U> |
CompletableFuture.thenApply(Function<? super T,? extends U> fn) |
<U> CompletableFuture<U> |
CompletableFuture.thenApplyAsync(Function<? super T,? extends U> fn) |
<U> CompletableFuture<U> |
CompletableFuture.thenApplyAsync(Function<? super T,? extends U> fn,
Executor executor) |
<U,V> CompletableFuture<V> |
CompletableFuture.thenCombine(CompletionStep<? extends U> other,
Function2<? super T,? super U,? extends V> fn) |
<U,V> CompletableFuture<V> |
CompletableFuture.thenCombineAsync(CompletionStep<? extends U> other,
Function2<? super T,? super U,? extends V> fn) |
<U,V> CompletableFuture<V> |
CompletableFuture.thenCombineAsync(CompletionStep<? extends U> other,
Function2<? super T,? super U,? extends V> fn,
Executor executor) |
<U> CompletableFuture<U> |
CompletableFuture.thenCompose(Function<? super T,? extends CompletionStep<U>> fn) |
<U> CompletableFuture<U> |
CompletableFuture.thenComposeAsync(Function<? super T,? extends CompletionStep<U>> fn) |
<U> CompletableFuture<U> |
CompletableFuture.thenComposeAsync(Function<? super T,? extends CompletionStep<U>> fn,
Executor executor) |
CompletableFuture<Void> |
CompletableFuture.thenRun(Runnable action) |
CompletableFuture<Void> |
CompletableFuture.thenRunAsync(Runnable action) |
CompletableFuture<Void> |
CompletableFuture.thenRunAsync(Runnable action,
Executor executor) |
CompletableFuture<T> |
CompletionStep.toCompletableFuture()
Returns a { CompletableFuture} maintaining the same
completion properties as this stage.
|
CompletableFuture<T> |
CompletableFuture.toCompletableFuture()
Returns this CompletableFuture.
|
CompletableFuture<T> |
CompletableFuture.whenComplete(Consumer2<? super T,? super Throwable> action) |
CompletableFuture<T> |
CompletableFuture.whenCompleteAsync(Consumer2<? super T,? super Throwable> action) |
CompletableFuture<T> |
CompletableFuture.whenCompleteAsync(Consumer2<? super T,? super Throwable> action,
Executor executor) |
| 限定符和类型 | 方法和说明 |
|---|---|
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.
|
Copyright © 2021. All rights reserved.