| Package | Description |
|---|---|
| java.util.concurrent |
Utility classes commonly useful in concurrent programming.
|
| 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 |
CompletionStage.acceptEither(CompletionStage
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 |
CompletionStage.acceptEitherAsync(CompletionStage
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 |
CompletionStage.acceptEitherAsync(CompletionStage
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.
|
<U> CompletionStage |
CompletionStage.applyToEither(CompletionStage
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 |
CompletionStage.applyToEitherAsync(CompletionStage
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 |
CompletionStage.applyToEitherAsync(CompletionStage
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.
|
CompletionStage |
CompletionStage.exceptionally(Function
Returns a new CompletionStage that, when this stage completes exceptionally, is executed with this stage's exception as the argument to the supplied function.
|
<U> CompletionStage |
CompletionStage.handle(BiFunction
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 |
CompletionStage.handleAsync(BiFunction
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 |
CompletionStage.handleAsync(BiFunction
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 |
CompletionStage.runAfterBoth(CompletionStage
Returns a new CompletionStage that, when this and the other given stage both complete normally, executes the given action.
|
CompletionStage |
CompletionStage.runAfterBothAsync(CompletionStage
Returns a new CompletionStage that, when this and the other given stage complete normally, executes the given action using this stage's default asynchronous execution facility.
|
CompletionStage |
CompletionStage.runAfterBothAsync(CompletionStage
Returns a new CompletionStage that, when this and the other given stage complete normally, executes the given action using the supplied executor See the
CompletionStage documentation for rules covering exceptional completion.
|
CompletionStage |
CompletionStage.runAfterEither(CompletionStage
Returns a new CompletionStage that, when either this or the other given stage complete normally, executes the given action.
|
CompletionStage |
CompletionStage.runAfterEitherAsync(CompletionStage
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 |
CompletionStage.runAfterEitherAsync(CompletionStage
Returns a new CompletionStage that, when either this or the other given stage complete normally, executes the given action using supplied executor.
|
CompletionStage |
CompletionStage.thenAccept(Consumer
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 |
CompletionStage.thenAcceptAsync(Consumer
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 |
CompletionStage.thenAcceptAsync(Consumer
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 |
CompletionStage.thenAcceptBoth(CompletionStage
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 |
CompletionStage.thenAcceptBothAsync(CompletionStage
Returns a new CompletionStage that, when this and the other given stage complete normally, is executed using this stage's default asynchronous execution facility, with the two results as arguments to the supplied action.
|
<U> CompletionStage |
CompletionStage.thenAcceptBothAsync(CompletionStage
Returns a new CompletionStage that, when this and the other given stage complete normally, is executed using the supplied executor, with the two results as arguments to the supplied function.
|
<U> CompletionStage |
CompletionStage.thenApply(Function
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 |
CompletionStage.thenApplyAsync(Function
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 |
CompletionStage.thenApplyAsync(Function
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 |
CompletionStage.thenCombine(CompletionStage
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 |
CompletionStage.thenCombineAsync(CompletionStage
Returns a new CompletionStage that, when this and the other given stage complete normally, is executed using this stage's default asynchronous execution facility, with the two results as arguments to the supplied function.
|
<U |
CompletionStage.thenCombineAsync(CompletionStage
Returns a new CompletionStage that, when this and the other given stage complete normally, is executed using the supplied executor, with the two results as arguments to the supplied function.
|
<U> CompletionStage |
CompletionStage.thenCompose(Function
Returns a new CompletionStage that, when this stage completes normally, is executed with this stage as the argument to the supplied function.
|
<U> CompletionStage |
CompletionStage.thenComposeAsync(Function
Returns a new CompletionStage that, when this stage completes normally, is executed using this stage's default asynchronous execution facility, with this stage as the argument to the supplied function.
|
<U> CompletionStage |
CompletionStage.thenComposeAsync(Function
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.
|
CompletionStage |
CompletionStage.thenRun(Runnable
Returns a new CompletionStage that, when this stage completes normally, executes the given action.
|
CompletionStage |
CompletionStage.thenRunAsync(Runnable
Returns a new CompletionStage that, when this stage completes normally, executes the given action using this stage's default asynchronous execution facility.
|
CompletionStage |
CompletionStage.thenRunAsync(Runnable
Returns a new CompletionStage that, when this stage completes normally, executes the given action using the supplied Executor.
|
CompletionStage |
CompletionStage.whenComplete(BiConsumer
Returns a new CompletionStage with the same result or exception as this stage, and when this stage completes, executes the given action with the result (or
null if none) and the exception (or
null if none) of this stage.
|
CompletionStage |
CompletionStage.whenCompleteAsync(BiConsumer
Returns a new CompletionStage with the same result or exception as this stage, and when this stage completes, executes the given action executes the given action using this stage's default asynchronous execution facility, with the result (or
null if none) and the exception (or
null if none) of this stage as arguments.
|
CompletionStage |
CompletionStage.whenCompleteAsync(BiConsumer
Returns a new CompletionStage with the same result or exception as this stage, and when this stage completes, executes using the supplied Executor, the given action with the result (or
null if none) and the exception (or
null if none) of this stage as arguments.
|
| Modifier and Type | Method and Description |
|---|---|
CompletionStage |
CompletionStage.acceptEither(CompletionStage
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 |
CompletableFuture.acceptEither(CompletionStage
|
CompletionStage |
CompletionStage.acceptEitherAsync(CompletionStage
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 |
CompletableFuture.acceptEitherAsync(CompletionStage
|
CompletionStage |
CompletionStage.acceptEitherAsync(CompletionStage
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 |
CompletableFuture.acceptEitherAsync(CompletionStage
|
<U> CompletionStage |
CompletionStage.applyToEither(CompletionStage
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 |
CompletableFuture.applyToEither(CompletionStage
|
<U> CompletionStage |
CompletionStage.applyToEitherAsync(CompletionStage
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 |
CompletableFuture.applyToEitherAsync(CompletionStage
|
<U> CompletionStage |
CompletionStage.applyToEitherAsync(CompletionStage
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.
|
<U> CompletableFuture |
CompletableFuture.applyToEitherAsync(CompletionStage
|
CompletionStage |
CompletionStage.runAfterBoth(CompletionStage
Returns a new CompletionStage that, when this and the other given stage both complete normally, executes the given action.
|
CompletableFuture |
CompletableFuture.runAfterBoth(CompletionStage
|
CompletionStage |
CompletionStage.runAfterBothAsync(CompletionStage
Returns a new CompletionStage that, when this and the other given stage complete normally, executes the given action using this stage's default asynchronous execution facility.
|
CompletableFuture |
CompletableFuture.runAfterBothAsync(CompletionStage
|
CompletionStage |
CompletionStage.runAfterBothAsync(CompletionStage
Returns a new CompletionStage that, when this and the other given stage complete normally, executes the given action using the supplied executor See the
CompletionStage documentation for rules covering exceptional completion.
|
CompletableFuture |
CompletableFuture.runAfterBothAsync(CompletionStage
|
CompletionStage |
CompletionStage.runAfterEither(CompletionStage
Returns a new CompletionStage that, when either this or the other given stage complete normally, executes the given action.
|
CompletableFuture |
CompletableFuture.runAfterEither(CompletionStage
|
CompletionStage |
CompletionStage.runAfterEitherAsync(CompletionStage
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 |
CompletableFuture.runAfterEitherAsync(CompletionStage
|
CompletionStage |
CompletionStage.runAfterEitherAsync(CompletionStage
Returns a new CompletionStage that, when either this or the other given stage complete normally, executes the given action using supplied executor.
|
CompletableFuture |
CompletableFuture.runAfterEitherAsync(CompletionStage
|
<U> CompletionStage |
CompletionStage.thenAcceptBoth(CompletionStage
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 |
CompletableFuture.thenAcceptBoth(CompletionStage
|
<U> CompletionStage |
CompletionStage.thenAcceptBothAsync(CompletionStage
Returns a new CompletionStage that, when this and the other given stage complete normally, is executed using this stage's default asynchronous execution facility, with the two results as arguments to the supplied action.
|
<U> CompletableFuture |
CompletableFuture.thenAcceptBothAsync(CompletionStage
|
<U> CompletionStage |
CompletionStage.thenAcceptBothAsync(CompletionStage
Returns a new CompletionStage that, when this and the other given stage complete normally, is executed using the supplied executor, with the two results as arguments to the supplied function.
|
<U> CompletableFuture |
CompletableFuture.thenAcceptBothAsync(CompletionStage
|
<U |
CompletionStage.thenCombine(CompletionStage
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 |
CompletableFuture.thenCombine(CompletionStage
|
<U |
CompletionStage.thenCombineAsync(CompletionStage
Returns a new CompletionStage that, when this and the other given stage complete normally, is executed using this stage's default asynchronous execution facility, with the two results as arguments to the supplied function.
|
<U |
CompletableFuture.thenCombineAsync(CompletionStage
|
<U |
CompletionStage.thenCombineAsync(CompletionStage
Returns a new CompletionStage that, when this and the other given stage complete normally, is executed using the supplied executor, with the two results as arguments to the supplied function.
|
<U |
CompletableFuture.thenCombineAsync(CompletionStage
|
| Modifier and Type | Method and Description |
|---|---|
<U> CompletionStage |
CompletionStage.thenCompose(Function
Returns a new CompletionStage that, when this stage completes normally, is executed with this stage as the argument to the supplied function.
|
<U> CompletableFuture |
CompletableFuture.thenCompose(Function
|
<U> CompletionStage |
CompletionStage.thenComposeAsync(Function
Returns a new CompletionStage that, when this stage completes normally, is executed using this stage's default asynchronous execution facility, with this stage as the argument to the supplied function.
|
<U> CompletableFuture |
CompletableFuture.thenComposeAsync(Function
|
<U> CompletionStage |
CompletionStage.thenComposeAsync(Function
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> CompletableFuture |
CompletableFuture.thenComposeAsync(Function
|