Package | Description |
---|---|
alluxio.concurrent.jsr |
Modifier and Type | Class and Description |
---|---|
class |
CompletableFuture<T>
A
Future that may be explicitly completed (setting its value and status), and may be used
as a CompletionStage , supporting dependent functions and actions that trigger upon its
completion. |
Modifier and Type | Method and Description |
---|---|
CompletionStage<Void> |
CompletionStage.acceptEither(CompletionStage<? extends T> other,
java.util.function.Consumer<? super T> action)
Returns a new CompletionStage that, when either this or the other given stage complete
normally, is executed with the corresponding result as argument to the supplied action.
|
CompletionStage<Void> |
CompletionStage.acceptEitherAsync(CompletionStage<? extends T> other,
java.util.function.Consumer<? super T> action)
Returns a new CompletionStage that, when either this or the other given stage complete
normally, is executed using this stage's default asynchronous execution facility, with the
corresponding result as argument to the supplied action.
|
CompletionStage<Void> |
CompletionStage.acceptEitherAsync(CompletionStage<? extends T> other,
java.util.function.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.applyToEither(CompletionStage<? extends T> other,
java.util.function.Function<? super T,U> fn)
Returns a new CompletionStage that, when either this or the other given stage complete
normally, is executed with the corresponding result as argument to the supplied function.
|
<U> CompletionStage<U> |
CompletionStage.applyToEitherAsync(CompletionStage<? extends T> other,
java.util.function.Function<? super T,U> fn)
Returns a new CompletionStage that, when either this or the other given stage complete
normally, is executed using this stage's default asynchronous execution facility, with the
corresponding result as argument to the supplied function.
|
<U> CompletionStage<U> |
CompletionStage.applyToEitherAsync(CompletionStage<? extends T> other,
java.util.function.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.
|
static <U> CompletionStage<U> |
CompletableFuture.completedStage(U value)
Returns a new CompletionStage that is already completed with the given value and supports only
those methods in interface
CompletionStage . |
CompletionStage<T> |
CompletionStage.exceptionally(java.util.function.Function<Throwable,? extends T> fn)
Returns a new CompletionStage that, when this stage completes exceptionally, is executed with
this stage's exception as the argument to the supplied function.
|
static <U> CompletionStage<U> |
CompletableFuture.failedStage(Throwable ex)
Returns a new CompletionStage that is already completed exceptionally with the given exception
and supports only those methods in interface
CompletionStage . |
<U> CompletionStage<U> |
CompletionStage.handle(java.util.function.BiFunction<? super T,Throwable,? extends U> fn)
Returns a new CompletionStage that, when this stage completes either normally or exceptionally,
is executed with this stage's result and exception as arguments to the supplied function.
|
<U> CompletionStage<U> |
CompletionStage.handleAsync(java.util.function.BiFunction<? super T,Throwable,? extends U> fn)
Returns a new CompletionStage that, when this stage completes either normally or exceptionally,
is executed using this stage's default asynchronous execution facility, with this stage's
result and exception as arguments to the supplied function.
|
<U> CompletionStage<U> |
CompletionStage.handleAsync(java.util.function.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<T> |
CompletableFuture.minimalCompletionStage()
Returns a new CompletionStage that is completed normally with the same value as this
CompletableFuture when it completes normally, and cannot be independently completed or
otherwise used in ways not defined by the methods of interface
CompletionStage . |
CompletionStage<Void> |
CompletionStage.runAfterBoth(CompletionStage<?> other,
Runnable action)
Returns a new CompletionStage that, when this and the other given stage both complete normally,
executes the given action.
|
CompletionStage<Void> |
CompletionStage.runAfterBothAsync(CompletionStage<?> other,
Runnable action)
Returns a new CompletionStage that, when this and the other given stage both complete normally,
executes the given action using this stage's default asynchronous execution facility.
|
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.runAfterEither(CompletionStage<?> other,
Runnable action)
Returns a new CompletionStage that, when either this or the other given stage complete
normally, executes the given action.
|
CompletionStage<Void> |
CompletionStage.runAfterEitherAsync(CompletionStage<?> other,
Runnable action)
Returns a new CompletionStage that, when either this or the other given stage complete
normally, executes the given action using this stage's default asynchronous execution facility.
|
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.
|
CompletionStage<Void> |
CompletionStage.thenAccept(java.util.function.Consumer<? super T> action)
Returns a new CompletionStage that, when this stage completes normally, is executed with this
stage's result as the argument to the supplied action.
|
CompletionStage<Void> |
CompletionStage.thenAcceptAsync(java.util.function.Consumer<? super T> action)
Returns a new CompletionStage that, when this stage completes normally, is executed using this
stage's default asynchronous execution facility, with this stage's result as the argument to
the supplied action.
|
CompletionStage<Void> |
CompletionStage.thenAcceptAsync(java.util.function.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.thenAcceptBoth(CompletionStage<? extends U> other,
java.util.function.BiConsumer<? super T,? super U> action)
Returns a new CompletionStage that, when this and the other given stage both complete normally,
is executed with the two results as arguments to the supplied action.
|
<U> CompletionStage<Void> |
CompletionStage.thenAcceptBothAsync(CompletionStage<? extends U> other,
java.util.function.BiConsumer<? super T,? super U> action)
Returns a new CompletionStage that, when this and the other given stage both complete normally,
is executed using this stage's default asynchronous execution facility, with the two results as
arguments to the supplied action.
|
<U> CompletionStage<Void> |
CompletionStage.thenAcceptBothAsync(CompletionStage<? extends U> other,
java.util.function.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.thenApply(java.util.function.Function<? super T,? extends U> fn)
Returns a new CompletionStage that, when this stage completes normally, is executed with this
stage's result as the argument to the supplied function.
|
<U> CompletionStage<U> |
CompletionStage.thenApplyAsync(java.util.function.Function<? super T,? extends U> fn)
Returns a new CompletionStage that, when this stage completes normally, is executed using this
stage's default asynchronous execution facility, with this stage's result as the argument to
the supplied function.
|
<U> CompletionStage<U> |
CompletionStage.thenApplyAsync(java.util.function.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.thenCombine(CompletionStage<? extends U> other,
java.util.function.BiFunction<? super T,? super U,? extends V> fn)
Returns a new CompletionStage that, when this and the other given stage both complete normally,
is executed with the two results as arguments to the supplied function.
|
<U,V> CompletionStage<V> |
CompletionStage.thenCombineAsync(CompletionStage<? extends U> other,
java.util.function.BiFunction<? super T,? super U,? extends V> fn)
Returns a new CompletionStage that, when this and the other given stage both complete normally,
is executed using this stage's default asynchronous execution facility, with the two results as
arguments to the supplied function.
|
<U,V> CompletionStage<V> |
CompletionStage.thenCombineAsync(CompletionStage<? extends U> other,
java.util.function.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.thenCompose(java.util.function.Function<? super T,? extends CompletionStage<U>> fn)
Returns a new CompletionStage that is completed with the same value as the CompletionStage
returned by the given function.
|
<U> CompletionStage<U> |
CompletionStage.thenComposeAsync(java.util.function.Function<? super T,? extends CompletionStage<U>> fn)
Returns a new CompletionStage that is completed with the same value as the CompletionStage
returned by the given function, executed using this stage's default asynchronous execution
facility.
|
<U> CompletionStage<U> |
CompletionStage.thenComposeAsync(java.util.function.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.thenRun(Runnable action)
Returns a new CompletionStage that, when this stage completes normally, executes the given
action.
|
CompletionStage<Void> |
CompletionStage.thenRunAsync(Runnable action)
Returns a new CompletionStage that, when this stage completes normally, executes the given
action using this stage's default asynchronous execution facility.
|
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.whenComplete(java.util.function.BiConsumer<? super T,? super Throwable> action)
Returns a new CompletionStage with the same result or exception as this stage, that executes
the given action when this stage completes.
|
CompletionStage<T> |
CompletionStage.whenCompleteAsync(java.util.function.BiConsumer<? super T,? super Throwable> action)
Returns a new CompletionStage with the same result or exception as this stage, that executes
the given action using this stage's default asynchronous execution facility when this stage
completes.
|
CompletionStage<T> |
CompletionStage.whenCompleteAsync(java.util.function.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.
|
Modifier and Type | Method and Description |
---|---|
CompletableFuture<Void> |
CompletableFuture.acceptEither(CompletionStage<? extends T> other,
java.util.function.Consumer<? super T> action) |
CompletionStage<Void> |
CompletionStage.acceptEither(CompletionStage<? extends T> other,
java.util.function.Consumer<? super T> action)
Returns a new CompletionStage that, when either this or the other given stage complete
normally, is executed with the corresponding result as argument to the supplied action.
|
CompletableFuture<Void> |
CompletableFuture.acceptEitherAsync(CompletionStage<? extends T> other,
java.util.function.Consumer<? super T> action) |
CompletionStage<Void> |
CompletionStage.acceptEitherAsync(CompletionStage<? extends T> other,
java.util.function.Consumer<? super T> action)
Returns a new CompletionStage that, when either this or the other given stage complete
normally, is executed using this stage's default asynchronous execution facility, with the
corresponding result as argument to the supplied action.
|
CompletableFuture<Void> |
CompletableFuture.acceptEitherAsync(CompletionStage<? extends T> other,
java.util.function.Consumer<? super T> action,
Executor executor) |
CompletionStage<Void> |
CompletionStage.acceptEitherAsync(CompletionStage<? extends T> other,
java.util.function.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> CompletableFuture<U> |
CompletableFuture.applyToEither(CompletionStage<? extends T> other,
java.util.function.Function<? super T,U> fn) |
<U> CompletionStage<U> |
CompletionStage.applyToEither(CompletionStage<? extends T> other,
java.util.function.Function<? super T,U> fn)
Returns a new CompletionStage that, when either this or the other given stage complete
normally, is executed with the corresponding result as argument to the supplied function.
|
<U> CompletableFuture<U> |
CompletableFuture.applyToEitherAsync(CompletionStage<? extends T> other,
java.util.function.Function<? super T,U> fn) |
<U> CompletionStage<U> |
CompletionStage.applyToEitherAsync(CompletionStage<? extends T> other,
java.util.function.Function<? super T,U> fn)
Returns a new CompletionStage that, when either this or the other given stage complete
normally, is executed using this stage's default asynchronous execution facility, with the
corresponding result as argument to the supplied function.
|
<U> CompletableFuture<U> |
CompletableFuture.applyToEitherAsync(CompletionStage<? extends T> other,
java.util.function.Function<? super T,U> fn,
Executor executor) |
<U> CompletionStage<U> |
CompletionStage.applyToEitherAsync(CompletionStage<? extends T> other,
java.util.function.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<Void> |
CompletableFuture.runAfterBoth(CompletionStage<?> other,
Runnable action) |
CompletionStage<Void> |
CompletionStage.runAfterBoth(CompletionStage<?> other,
Runnable action)
Returns a new CompletionStage that, when this and the other given stage both complete normally,
executes the given action.
|
CompletableFuture<Void> |
CompletableFuture.runAfterBothAsync(CompletionStage<?> other,
Runnable action) |
CompletionStage<Void> |
CompletionStage.runAfterBothAsync(CompletionStage<?> other,
Runnable action)
Returns a new CompletionStage that, when this and the other given stage both complete normally,
executes the given action using this stage's default asynchronous execution facility.
|
CompletableFuture<Void> |
CompletableFuture.runAfterBothAsync(CompletionStage<?> other,
Runnable action,
Executor executor) |
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.
|
CompletableFuture<Void> |
CompletableFuture.runAfterEither(CompletionStage<?> other,
Runnable action) |
CompletionStage<Void> |
CompletionStage.runAfterEither(CompletionStage<?> other,
Runnable action)
Returns a new CompletionStage that, when either this or the other given stage complete
normally, executes the given action.
|
CompletableFuture<Void> |
CompletableFuture.runAfterEitherAsync(CompletionStage<?> other,
Runnable action) |
CompletionStage<Void> |
CompletionStage.runAfterEitherAsync(CompletionStage<?> other,
Runnable action)
Returns a new CompletionStage that, when either this or the other given stage complete
normally, executes the given action using this stage's default asynchronous execution facility.
|
CompletableFuture<Void> |
CompletableFuture.runAfterEitherAsync(CompletionStage<?> other,
Runnable action,
Executor 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.
|
<U> CompletableFuture<Void> |
CompletableFuture.thenAcceptBoth(CompletionStage<? extends U> other,
java.util.function.BiConsumer<? super T,? super U> action) |
<U> CompletionStage<Void> |
CompletionStage.thenAcceptBoth(CompletionStage<? extends U> other,
java.util.function.BiConsumer<? super T,? super U> action)
Returns a new CompletionStage that, when this and the other given stage both complete normally,
is executed with the two results as arguments to the supplied action.
|
<U> CompletableFuture<Void> |
CompletableFuture.thenAcceptBothAsync(CompletionStage<? extends U> other,
java.util.function.BiConsumer<? super T,? super U> action) |
<U> CompletionStage<Void> |
CompletionStage.thenAcceptBothAsync(CompletionStage<? extends U> other,
java.util.function.BiConsumer<? super T,? super U> action)
Returns a new CompletionStage that, when this and the other given stage both complete normally,
is executed using this stage's default asynchronous execution facility, with the two results as
arguments to the supplied action.
|
<U> CompletableFuture<Void> |
CompletableFuture.thenAcceptBothAsync(CompletionStage<? extends U> other,
java.util.function.BiConsumer<? super T,? super U> action,
Executor executor) |
<U> CompletionStage<Void> |
CompletionStage.thenAcceptBothAsync(CompletionStage<? extends U> other,
java.util.function.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,V> CompletableFuture<V> |
CompletableFuture.thenCombine(CompletionStage<? extends U> other,
java.util.function.BiFunction<? super T,? super U,? extends V> fn) |
<U,V> CompletionStage<V> |
CompletionStage.thenCombine(CompletionStage<? extends U> other,
java.util.function.BiFunction<? super T,? super U,? extends V> fn)
Returns a new CompletionStage that, when this and the other given stage both complete normally,
is executed with the two results as arguments to the supplied function.
|
<U,V> CompletableFuture<V> |
CompletableFuture.thenCombineAsync(CompletionStage<? extends U> other,
java.util.function.BiFunction<? super T,? super U,? extends V> fn) |
<U,V> CompletionStage<V> |
CompletionStage.thenCombineAsync(CompletionStage<? extends U> other,
java.util.function.BiFunction<? super T,? super U,? extends V> fn)
Returns a new CompletionStage that, when this and the other given stage both complete normally,
is executed using this stage's default asynchronous execution facility, with the two results as
arguments to the supplied function.
|
<U,V> CompletableFuture<V> |
CompletableFuture.thenCombineAsync(CompletionStage<? extends U> other,
java.util.function.BiFunction<? super T,? super U,? extends V> fn,
Executor executor) |
<U,V> CompletionStage<V> |
CompletionStage.thenCombineAsync(CompletionStage<? extends U> other,
java.util.function.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.
|
Modifier and Type | Method and Description |
---|---|
<U> CompletableFuture<U> |
CompletableFuture.thenCompose(java.util.function.Function<? super T,? extends CompletionStage<U>> fn) |
<U> CompletionStage<U> |
CompletionStage.thenCompose(java.util.function.Function<? super T,? extends CompletionStage<U>> fn)
Returns a new CompletionStage that is completed with the same value as the CompletionStage
returned by the given function.
|
<U> CompletableFuture<U> |
CompletableFuture.thenComposeAsync(java.util.function.Function<? super T,? extends CompletionStage<U>> fn) |
<U> CompletionStage<U> |
CompletionStage.thenComposeAsync(java.util.function.Function<? super T,? extends CompletionStage<U>> fn)
Returns a new CompletionStage that is completed with the same value as the CompletionStage
returned by the given function, executed using this stage's default asynchronous execution
facility.
|
<U> CompletableFuture<U> |
CompletableFuture.thenComposeAsync(java.util.function.Function<? super T,? extends CompletionStage<U>> fn,
Executor executor) |
<U> CompletionStage<U> |
CompletionStage.thenComposeAsync(java.util.function.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.
|
Copyright © 2023. All Rights Reserved.