Spec-Zone .ru
спецификации, руководства, описания, API
|
Package | Description |
---|---|
java.util.concurrent |
Utility classes commonly useful in concurrent programming.
|
Modifier and Type | Method and Description |
---|---|
CompletableFuture<Void> |
CompletableFuture.acceptEither(CompletableFuture<? extends T> other,
Consumer<? super T> block)
Returns a new CompletableFuture that is completed
when either this or the other given CompletableFuture completes,
after performing the given action with the result of either this
or the other CompletableFuture's result.
|
CompletableFuture<Void> |
CompletableFuture.acceptEitherAsync(CompletableFuture<? extends T> other,
Consumer<? super T> block)
Returns a new CompletableFuture that is asynchronously completed
when either this or the other given CompletableFuture completes,
after performing the given action with the result of either this
or the other CompletableFuture's result from a task running in
the
ForkJoinPool.commonPool() . |
CompletableFuture<Void> |
CompletableFuture.acceptEitherAsync(CompletableFuture<? extends T> other,
Consumer<? super T> block,
Executor executor)
Returns a new CompletableFuture that is asynchronously completed
when either this or the other given CompletableFuture completes,
after performing the given action with the result of either this
or the other CompletableFuture's result from a task running in
the given 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(CompletableFuture<? extends T> other,
Function<? super T,U> fn)
Returns a new CompletableFuture that is completed
when either this or the other given CompletableFuture completes,
with the result of the given function of either this or the other
CompletableFuture's result.
|
<U> CompletableFuture<U> |
CompletableFuture.applyToEitherAsync(CompletableFuture<? extends T> other,
Function<? super T,U> fn)
Returns a new CompletableFuture that is asynchronously completed
when either this or the other given CompletableFuture completes,
with the result of the given function of either this or the other
CompletableFuture's result from a task running in the
ForkJoinPool.commonPool() . |
<U> CompletableFuture<U> |
CompletableFuture.applyToEitherAsync(CompletableFuture<? extends T> other,
Function<? super T,U> fn,
Executor executor)
Returns a new CompletableFuture that is asynchronously completed
when either this or the other given CompletableFuture completes,
with the result of the given function of either this or the other
CompletableFuture's result from a task running in 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.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(BiFunction<? super T,Throwable,? extends U> fn)
Returns a new CompletableFuture that is completed when this
CompletableFuture completes, with the result of the given
function of the result and exception of this CompletableFuture's
completion.
|
CompletableFuture<Void> |
CompletableFuture.runAfterBoth(CompletableFuture<?> other,
Runnable action)
Returns a new CompletableFuture that is completed
when both this and the other given CompletableFuture complete,
after performing the given action.
|
CompletableFuture<Void> |
CompletableFuture.runAfterBothAsync(CompletableFuture<?> other,
Runnable action)
Returns a new CompletableFuture that is asynchronously completed
when both this and the other given CompletableFuture complete,
after performing the given action from a task running in the
ForkJoinPool.commonPool() . |
CompletableFuture<Void> |
CompletableFuture.runAfterBothAsync(CompletableFuture<?> other,
Runnable action,
Executor executor)
Returns a new CompletableFuture that is asynchronously completed
when both this and the other given CompletableFuture complete,
after performing the given action from a task running in the
given executor.
|
CompletableFuture<Void> |
CompletableFuture.runAfterEither(CompletableFuture<?> other,
Runnable action)
Returns a new CompletableFuture that is completed
when either this or the other given CompletableFuture completes,
after performing the given action.
|
CompletableFuture<Void> |
CompletableFuture.runAfterEitherAsync(CompletableFuture<?> other,
Runnable action)
Returns a new CompletableFuture that is asynchronously completed
when either this or the other given CompletableFuture completes,
after performing the given action from a task running in the
ForkJoinPool.commonPool() . |
CompletableFuture<Void> |
CompletableFuture.runAfterEitherAsync(CompletableFuture<?> other,
Runnable action,
Executor executor)
Returns a new CompletableFuture that is asynchronously completed
when either this or the other given CompletableFuture completes,
after performing the given action from a task running in the
given 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(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<Void> |
CompletableFuture.thenAccept(Consumer<? super T> block)
Returns a new CompletableFuture that is completed
when this CompletableFuture completes, after performing the given
action with this CompletableFuture's result.
|
CompletableFuture<Void> |
CompletableFuture.thenAcceptAsync(Consumer<? super T> block)
Returns a new CompletableFuture that is asynchronously completed
when this CompletableFuture completes, after performing the given
action with this CompletableFuture's result from a task running
in the
ForkJoinPool.commonPool() . |
CompletableFuture<Void> |
CompletableFuture.thenAcceptAsync(Consumer<? super T> block,
Executor executor)
Returns a new CompletableFuture that is asynchronously completed
when this CompletableFuture completes, after performing the given
action with this CompletableFuture's result from a task running
in the given executor.
|
<U> CompletableFuture<Void> |
CompletableFuture.thenAcceptBoth(CompletableFuture<? extends U> other,
BiConsumer<? super T,? super U> block)
Returns a new CompletableFuture that is completed
when both this and the other given CompletableFuture complete,
after performing the given action with the results of the two
CompletableFutures.
|
<U> CompletableFuture<Void> |
CompletableFuture.thenAcceptBothAsync(CompletableFuture<? extends U> other,
BiConsumer<? super T,? super U> block)
Returns a new CompletableFuture that is asynchronously completed
when both this and the other given CompletableFuture complete,
after performing the given action with the results of the two
CompletableFutures from a task running in the
ForkJoinPool.commonPool() . |
<U> CompletableFuture<Void> |
CompletableFuture.thenAcceptBothAsync(CompletableFuture<? extends U> other,
BiConsumer<? super T,? super U> block,
Executor executor)
Returns a new CompletableFuture that is asynchronously completed
when both this and the other given CompletableFuture complete,
after performing the given action with the results of the two
CompletableFutures from a task running in the given executor.
|
<U> CompletableFuture<U> |
CompletableFuture.thenApply(Function<? super T,? extends U> fn)
Returns a new CompletableFuture that is completed
when this CompletableFuture completes, with the result of the
given function of this CompletableFuture's result.
|
<U> CompletableFuture<U> |
CompletableFuture.thenApplyAsync(Function<? super T,? extends U> fn)
Returns a new CompletableFuture that is asynchronously completed
when this CompletableFuture completes, with the result of the
given function of this CompletableFuture's result from a
task running in the
ForkJoinPool.commonPool() . |
<U> CompletableFuture<U> |
CompletableFuture.thenApplyAsync(Function<? super T,? extends U> fn,
Executor executor)
Returns a new CompletableFuture that is asynchronously completed
when this CompletableFuture completes, with the result of the
given function of this CompletableFuture's result from a
task running in the given executor.
|
<U,V> CompletableFuture<V> |
CompletableFuture.thenCombine(CompletableFuture<? extends U> other,
BiFunction<? super T,? super U,? extends V> fn)
Returns a new CompletableFuture that is completed
when both this and the other given CompletableFuture complete,
with the result of the given function of the results of the two
CompletableFutures.
|
<U,V> CompletableFuture<V> |
CompletableFuture.thenCombineAsync(CompletableFuture<? extends U> other,
BiFunction<? super T,? super U,? extends V> fn)
Returns a new CompletableFuture that is asynchronously completed
when both this and the other given CompletableFuture complete,
with the result of the given function of the results of the two
CompletableFutures from a task running in the
ForkJoinPool.commonPool() . |
<U,V> CompletableFuture<V> |
CompletableFuture.thenCombineAsync(CompletableFuture<? extends U> other,
BiFunction<? super T,? super U,? extends V> fn,
Executor executor)
Returns a new CompletableFuture that is asynchronously completed
when both this and the other given CompletableFuture complete,
with the result of the given function of the results of the two
CompletableFutures from a task running in the given executor.
|
<U> CompletableFuture<U> |
CompletableFuture.thenCompose(Function<? super T,CompletableFuture<U>> fn)
Returns a CompletableFuture that upon completion, has the same
value as produced by the given function of the result of this
CompletableFuture.
|
<U> CompletableFuture<U> |
CompletableFuture.thenComposeAsync(Function<? super T,CompletableFuture<U>> fn)
Returns a CompletableFuture that upon completion, has the same
value as that produced asynchronously using the
ForkJoinPool.commonPool() by the given function of the result
of this CompletableFuture. |
<U> CompletableFuture<U> |
CompletableFuture.thenComposeAsync(Function<? super T,CompletableFuture<U>> fn,
Executor executor)
Returns a CompletableFuture that upon completion, has the same
value as that produced asynchronously using the given executor
by the given function of this CompletableFuture.
|
CompletableFuture<Void> |
CompletableFuture.thenRun(Runnable action)
Returns a new CompletableFuture that is completed
when this CompletableFuture completes, after performing the given
action.
|
CompletableFuture<Void> |
CompletableFuture.thenRunAsync(Runnable action)
Returns a new CompletableFuture that is asynchronously completed
when this CompletableFuture completes, after performing the given
action from a task running in the
ForkJoinPool.commonPool() . |
CompletableFuture<Void> |
CompletableFuture.thenRunAsync(Runnable action,
Executor executor)
Returns a new CompletableFuture that is asynchronously completed
when this CompletableFuture completes, after performing the given
action from a task running in the given executor.
|
Modifier and Type | Method and Description |
---|---|
CompletableFuture<Void> |
CompletableFuture.acceptEither(CompletableFuture<? extends T> other,
Consumer<? super T> block)
Returns a new CompletableFuture that is completed
when either this or the other given CompletableFuture completes,
after performing the given action with the result of either this
or the other CompletableFuture's result.
|
CompletableFuture<Void> |
CompletableFuture.acceptEitherAsync(CompletableFuture<? extends T> other,
Consumer<? super T> block)
Returns a new CompletableFuture that is asynchronously completed
when either this or the other given CompletableFuture completes,
after performing the given action with the result of either this
or the other CompletableFuture's result from a task running in
the
ForkJoinPool.commonPool() . |
CompletableFuture<Void> |
CompletableFuture.acceptEitherAsync(CompletableFuture<? extends T> other,
Consumer<? super T> block,
Executor executor)
Returns a new CompletableFuture that is asynchronously completed
when either this or the other given CompletableFuture completes,
after performing the given action with the result of either this
or the other CompletableFuture's result from a task running in
the given 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(CompletableFuture<? extends T> other,
Function<? super T,U> fn)
Returns a new CompletableFuture that is completed
when either this or the other given CompletableFuture completes,
with the result of the given function of either this or the other
CompletableFuture's result.
|
<U> CompletableFuture<U> |
CompletableFuture.applyToEitherAsync(CompletableFuture<? extends T> other,
Function<? super T,U> fn)
Returns a new CompletableFuture that is asynchronously completed
when either this or the other given CompletableFuture completes,
with the result of the given function of either this or the other
CompletableFuture's result from a task running in the
ForkJoinPool.commonPool() . |
<U> CompletableFuture<U> |
CompletableFuture.applyToEitherAsync(CompletableFuture<? extends T> other,
Function<? super T,U> fn,
Executor executor)
Returns a new CompletableFuture that is asynchronously completed
when either this or the other given CompletableFuture completes,
with the result of the given function of either this or the other
CompletableFuture's result from a task running in the
given executor.
|
CompletableFuture<Void> |
CompletableFuture.runAfterBoth(CompletableFuture<?> other,
Runnable action)
Returns a new CompletableFuture that is completed
when both this and the other given CompletableFuture complete,
after performing the given action.
|
CompletableFuture<Void> |
CompletableFuture.runAfterBothAsync(CompletableFuture<?> other,
Runnable action)
Returns a new CompletableFuture that is asynchronously completed
when both this and the other given CompletableFuture complete,
after performing the given action from a task running in the
ForkJoinPool.commonPool() . |
CompletableFuture<Void> |
CompletableFuture.runAfterBothAsync(CompletableFuture<?> other,
Runnable action,
Executor executor)
Returns a new CompletableFuture that is asynchronously completed
when both this and the other given CompletableFuture complete,
after performing the given action from a task running in the
given executor.
|
CompletableFuture<Void> |
CompletableFuture.runAfterEither(CompletableFuture<?> other,
Runnable action)
Returns a new CompletableFuture that is completed
when either this or the other given CompletableFuture completes,
after performing the given action.
|
CompletableFuture<Void> |
CompletableFuture.runAfterEitherAsync(CompletableFuture<?> other,
Runnable action)
Returns a new CompletableFuture that is asynchronously completed
when either this or the other given CompletableFuture completes,
after performing the given action from a task running in the
ForkJoinPool.commonPool() . |
CompletableFuture<Void> |
CompletableFuture.runAfterEitherAsync(CompletableFuture<?> other,
Runnable action,
Executor executor)
Returns a new CompletableFuture that is asynchronously completed
when either this or the other given CompletableFuture completes,
after performing the given action from a task running in the
given executor.
|
<U> CompletableFuture<Void> |
CompletableFuture.thenAcceptBoth(CompletableFuture<? extends U> other,
BiConsumer<? super T,? super U> block)
Returns a new CompletableFuture that is completed
when both this and the other given CompletableFuture complete,
after performing the given action with the results of the two
CompletableFutures.
|
<U> CompletableFuture<Void> |
CompletableFuture.thenAcceptBothAsync(CompletableFuture<? extends U> other,
BiConsumer<? super T,? super U> block)
Returns a new CompletableFuture that is asynchronously completed
when both this and the other given CompletableFuture complete,
after performing the given action with the results of the two
CompletableFutures from a task running in the
ForkJoinPool.commonPool() . |
<U> CompletableFuture<Void> |
CompletableFuture.thenAcceptBothAsync(CompletableFuture<? extends U> other,
BiConsumer<? super T,? super U> block,
Executor executor)
Returns a new CompletableFuture that is asynchronously completed
when both this and the other given CompletableFuture complete,
after performing the given action with the results of the two
CompletableFutures from a task running in the given executor.
|
<U,V> CompletableFuture<V> |
CompletableFuture.thenCombine(CompletableFuture<? extends U> other,
BiFunction<? super T,? super U,? extends V> fn)
Returns a new CompletableFuture that is completed
when both this and the other given CompletableFuture complete,
with the result of the given function of the results of the two
CompletableFutures.
|
<U,V> CompletableFuture<V> |
CompletableFuture.thenCombineAsync(CompletableFuture<? extends U> other,
BiFunction<? super T,? super U,? extends V> fn)
Returns a new CompletableFuture that is asynchronously completed
when both this and the other given CompletableFuture complete,
with the result of the given function of the results of the two
CompletableFutures from a task running in the
ForkJoinPool.commonPool() . |
<U,V> CompletableFuture<V> |
CompletableFuture.thenCombineAsync(CompletableFuture<? extends U> other,
BiFunction<? super T,? super U,? extends V> fn,
Executor executor)
Returns a new CompletableFuture that is asynchronously completed
when both this and the other given CompletableFuture complete,
with the result of the given function of the results of the two
CompletableFutures from a task running in the given executor.
|
Modifier and Type | Method and Description |
---|---|
<U> CompletableFuture<U> |
CompletableFuture.thenCompose(Function<? super T,CompletableFuture<U>> fn)
Returns a CompletableFuture that upon completion, has the same
value as produced by the given function of the result of this
CompletableFuture.
|
<U> CompletableFuture<U> |
CompletableFuture.thenComposeAsync(Function<? super T,CompletableFuture<U>> fn)
Returns a CompletableFuture that upon completion, has the same
value as that produced asynchronously using the
ForkJoinPool.commonPool() by the given function of the result
of this CompletableFuture. |
<U> CompletableFuture<U> |
CompletableFuture.thenComposeAsync(Function<? super T,CompletableFuture<U>> fn,
Executor executor)
Returns a CompletableFuture that upon completion, has the same
value as that produced asynchronously using the given executor
by the given function of this CompletableFuture.
|
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2013, Oracle and/or its affiliates. All rights reserved.
DRAFT ea-b92