Class CfParallelUtils
Supports different concurrency strategies: all-fail-fast, all-success, most-success, all-complete, any-success and any-complete.
The parallel processing methods are divided into two categories:
- Factory methods that create CompletableFutures from input collections
- Instance methods that chain parallel operations on existing CompletableFutures(CompletionStages)
NOTE: For all methods, the input Iterable is allowed to contain null
elements which are
passed directly to the sequential actions, matching CompletableFuture's behavior of allowing null
values.
To skip processing null
values, filter them out from the input collection beforehand.
- Author:
- Jerry Lee (oldratlee at gmail dot com)
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> CompletableFuture
<Void> parAcceptAnyAsync
(Iterable<? extends T> elements, Consumer<? super T> action) Shortcut to methodanyOf
, processes multiple input elements in parallel by wrapping each element's action computation into a CompletableFuture usingCompletableFuture.runAsync(Runnable)
.static <T> CompletableFuture
<Void> parAcceptAnyAsync
(Iterable<? extends T> elements, Consumer<? super T> action, Executor executor) Shortcut to methodanyOf
, processes multiple input elements in parallel by wrapping each element's action computation into a CompletableFuture usingCompletableFuture.runAsync(Runnable, Executor)
.static <T> CompletableFuture
<Void> parAcceptAnySuccessAsync
(Iterable<? extends T> elements, Consumer<? super T> action) Shortcut to methodanySuccessOf
, processes multiple input elements in parallel by wrapping each element's action computation into a CompletableFuture usingCompletableFuture.runAsync(Runnable)
.static <T> CompletableFuture
<Void> parAcceptAnySuccessAsync
(Iterable<? extends T> elements, Consumer<? super T> action, Executor executor) Shortcut to methodanySuccessOf
, processes multiple input elements in parallel by wrapping each element's action computation into a CompletableFuture usingCompletableFuture.runAsync(Runnable, Executor)
.static <T> CompletableFuture
<Void> parAcceptAsync
(Iterable<? extends T> elements, Consumer<? super T> action) Shortcut to methodallOf
, processes multiple input elements in parallel by wrapping each element's action computation into a CompletableFuture usingCompletableFuture.runAsync(Runnable)
.static <T> CompletableFuture
<Void> parAcceptAsync
(Iterable<? extends T> elements, Consumer<? super T> action, Executor executor) Shortcut to methodallOf
, processes multiple input elements in parallel by wrapping each element's action computation into a CompletableFuture usingCompletableFuture.runAsync(Runnable, Executor)
.static <T> CompletableFuture
<Void> parAcceptFailFastAsync
(Iterable<? extends T> elements, Consumer<? super T> action) Shortcut to methodallResultsFailFastOf
, processes multiple input elements in parallel by wrapping each element's action computation into a CompletableFuture usingCompletableFuture.runAsync(Runnable)
.static <T> CompletableFuture
<Void> parAcceptFailFastAsync
(Iterable<? extends T> elements, Consumer<? super T> action, Executor executor) Shortcut to methodallResultsFailFastOf
, processes multiple input elements in parallel by wrapping each element's action computation into a CompletableFuture usingCompletableFuture.runAsync(Runnable, Executor)
.static <T,
U> CompletableFuture <List<U>> parApplyAllSuccessAsync
(Iterable<? extends T> elements, U valueIfFailed, Function<? super T, ? extends U> fn) Shortcut to methodallSuccessResultsOf
, processes multiple input elements in parallel by wrapping each element's function computation into a CompletableFuture usingCompletableFuture.supplyAsync(Supplier)
.static <T,
U> CompletableFuture <List<U>> parApplyAllSuccessAsync
(Iterable<? extends T> elements, U valueIfFailed, Function<? super T, ? extends U> fn, Executor executor) Shortcut to methodallSuccessResultsOf
, processes multiple input elements in parallel by wrapping each element's function computation into a CompletableFuture usingCompletableFuture.supplyAsync(Supplier, Executor)
.static <T,
U> CompletableFuture <U> parApplyAnyAsync
(Iterable<? extends T> elements, Function<? super T, ? extends U> fn) Shortcut to methodanyOf
, processes multiple input elements in parallel by wrapping each element's function computation into a CompletableFuture usingCompletableFuture.supplyAsync(Supplier)
.static <T,
U> CompletableFuture <U> parApplyAnyAsync
(Iterable<? extends T> elements, Function<? super T, ? extends U> fn, Executor executor) Shortcut to methodanyOf
, processes multiple input elements in parallel by wrapping each element's function computation into a CompletableFuture usingCompletableFuture.supplyAsync(Supplier, Executor)
.static <T,
U> CompletableFuture <U> parApplyAnySuccessAsync
(Iterable<? extends T> elements, Function<? super T, ? extends U> fn) Shortcut to methodanySuccessOf
, processes multiple input elements in parallel by wrapping each element's function computation into a CompletableFuture usingCompletableFuture.supplyAsync(Supplier)
.static <T,
U> CompletableFuture <U> parApplyAnySuccessAsync
(Iterable<? extends T> elements, Function<? super T, ? extends U> fn, Executor executor) Shortcut to methodanySuccessOf
, processes multiple input elements in parallel by wrapping each element's function computation into a CompletableFuture usingCompletableFuture.supplyAsync(Supplier, Executor)
.static <T,
U> CompletableFuture <List<U>> parApplyAsync
(Iterable<? extends T> elements, Function<? super T, ? extends U> fn) Shortcut to methodallResultsOf
, processes multiple input elements in parallel by wrapping each element's function computation into a CompletableFuture usingCompletableFuture.supplyAsync(Supplier)
.static <T,
U> CompletableFuture <List<U>> parApplyAsync
(Iterable<? extends T> elements, Function<? super T, ? extends U> fn, Executor executor) Shortcut to methodallResultsOf
, processes multiple input elements in parallel by wrapping each element's function computation into a CompletableFuture usingCompletableFuture.supplyAsync(Supplier, Executor)
.static <T,
U> CompletableFuture <List<U>> parApplyFailFastAsync
(Iterable<? extends T> elements, Function<? super T, ? extends U> fn) Shortcut to methodallResultsFailFastOf
, processes multiple input elements in parallel by wrapping each element's function computation into a CompletableFuture usingCompletableFuture.supplyAsync(Supplier)
.static <T,
U> CompletableFuture <List<U>> parApplyFailFastAsync
(Iterable<? extends T> elements, Function<? super T, ? extends U> fn, Executor executor) Shortcut to methodallResultsFailFastOf
, processes multiple input elements in parallel by wrapping each element's function computation into a CompletableFuture usingCompletableFuture.supplyAsync(Supplier, Executor)
.static <T,
U> CompletableFuture <List<U>> parApplyMostSuccessAsync
(Iterable<? extends T> elements, U valueIfNotSuccess, long timeout, TimeUnit unit, Function<? super T, ? extends U> fn) Shortcut to methodmostSuccessResultsOf
, processes multiple input elements in parallel by wrapping each element's function computation into a CompletableFuture usingCompletableFuture.supplyAsync(Supplier)
.static <T,
U> CompletableFuture <List<U>> parApplyMostSuccessAsync
(Iterable<? extends T> elements, U valueIfNotSuccess, long timeout, TimeUnit unit, Function<? super T, ? extends U> fn, Executor executor) Shortcut to methodmostSuccessResultsOf
, processes multiple input elements in parallel by wrapping each element's function computation into a CompletableFuture usingCompletableFuture.supplyAsync(Supplier, Executor)
.static <T> CompletableFuture
<Void> thenParAcceptAnyAsync
(CompletableFuture<? extends Iterable<? extends T>> cfThis, Consumer<? super T> action) Shortcut to methodanyOf
, processes elements from the result of parameter cfThis in parallel by wrapping each element's action computation into a CompletableFuture usingCompletableFuture.runAsync(Runnable, Executor)
with the default executor of parameter cfThis.static <T> CompletableFuture
<Void> thenParAcceptAnyAsync
(CompletableFuture<? extends Iterable<? extends T>> cfThis, Consumer<? super T> action, Executor executor) Shortcut to methodanyOf
, processes elements from the result of parameter cfThis in parallel by wrapping each element's action computation into a CompletableFuture usingCompletableFuture.runAsync(Runnable, Executor)
.static <T> CompletableFuture
<Void> thenParAcceptAnySuccessAsync
(CompletableFuture<? extends Iterable<? extends T>> cfThis, Consumer<? super T> action) Shortcut to methodanySuccessOf
, processes elements from the result of parameter cfThis in parallel by wrapping each element's action computation into a CompletableFuture usingCompletableFuture.runAsync(Runnable, Executor)
with the default executor of parameter cfThis.static <T> CompletableFuture
<Void> thenParAcceptAnySuccessAsync
(CompletableFuture<? extends Iterable<? extends T>> cfThis, Consumer<? super T> action, Executor executor) Shortcut to methodanySuccessOf
, processes elements from the result of parameter cfThis in parallel by wrapping each element's action computation into a CompletableFuture usingCompletableFuture.runAsync(Runnable, Executor)
.static <T> CompletableFuture
<Void> thenParAcceptAsync
(CompletableFuture<? extends Iterable<? extends T>> cfThis, Consumer<? super T> action) Shortcut to methodallOf
, processes elements from the result of parameter cfThis in parallel by wrapping each element's action computation into a CompletableFuture usingCompletableFuture.runAsync(Runnable, Executor)
with the default executor of parameter cfThis.static <T> CompletableFuture
<Void> thenParAcceptAsync
(CompletableFuture<? extends Iterable<? extends T>> cfThis, Consumer<? super T> action, Executor executor) Shortcut to methodallOf
, processes elements from the result of parameter cfThis in parallel by wrapping each element's action computation into a CompletableFuture usingCompletableFuture.runAsync(Runnable, Executor)
.static <T> CompletableFuture
<Void> thenParAcceptFailFastAsync
(CompletableFuture<? extends Iterable<? extends T>> cfThis, Consumer<? super T> action) Shortcut to methodallResultsFailFastOf
, processes elements from the result of parameter cfThis in parallel by wrapping each element's action computation into a CompletableFuture usingCompletableFuture.runAsync(Runnable, Executor)
with the default executor of parameter cfThis.static <T> CompletableFuture
<Void> thenParAcceptFailFastAsync
(CompletableFuture<? extends Iterable<? extends T>> cfThis, Consumer<? super T> action, Executor executor) Shortcut to methodallResultsFailFastOf
, processes elements from the result of parameter cfThis in parallel by wrapping each element's action computation into a CompletableFuture usingCompletableFuture.runAsync(Runnable, Executor)
.static <T,
U> CompletableFuture <List<U>> thenParApplyAllSuccessAsync
(CompletableFuture<? extends Iterable<? extends T>> cfThis, U valueIfFailed, Function<? super T, ? extends U> fn) Shortcut to methodallSuccessResultsOf
, processes elements from the result of parameter cfThis in parallel by wrapping each element's function computation into a CompletableFuture usingCompletableFuture.supplyAsync(Supplier, Executor)
with the default executor of parameter cfThis.static <T,
U> CompletableFuture <List<U>> thenParApplyAllSuccessAsync
(CompletableFuture<? extends Iterable<? extends T>> cfThis, U valueIfFailed, Function<? super T, ? extends U> fn, Executor executor) Shortcut to methodallSuccessResultsOf
, processes elements from the result of parameter cfThis in parallel by wrapping each element's function computation into a CompletableFuture usingCompletableFuture.supplyAsync(Supplier, Executor)
.static <T,
U> CompletableFuture <U> thenParApplyAnyAsync
(CompletableFuture<? extends Iterable<? extends T>> cfThis, Function<? super T, ? extends U> fn) Shortcut to methodanyOf
, processes elements from the result of parameter cfThis in parallel by wrapping each element's function computation into a CompletableFuture usingCompletableFuture.supplyAsync(Supplier, Executor)
with the default executor of parameter cfThis.static <T,
U> CompletableFuture <U> thenParApplyAnyAsync
(CompletableFuture<? extends Iterable<? extends T>> cfThis, Function<? super T, ? extends U> fn, Executor executor) Shortcut to methodanyOf
, processes elements from the result of parameter cfThis in parallel by wrapping each element's function computation into a CompletableFuture usingCompletableFuture.supplyAsync(Supplier, Executor)
.static <T,
U> CompletableFuture <U> thenParApplyAnySuccessAsync
(CompletableFuture<? extends Iterable<? extends T>> cfThis, Function<? super T, ? extends U> fn) Shortcut to methodanySuccessOf
, processes elements from the result of parameter cfThis in parallel by wrapping each element's function computation into a CompletableFuture usingCompletableFuture.supplyAsync(Supplier, Executor)
with the default executor of parameter cfThis.static <T,
U> CompletableFuture <U> thenParApplyAnySuccessAsync
(CompletableFuture<? extends Iterable<? extends T>> cfThis, Function<? super T, ? extends U> fn, Executor executor) Shortcut to methodanySuccessOf
, processes elements from the result of parameter cfThis in parallel by wrapping each element's function computation into a CompletableFuture usingCompletableFuture.supplyAsync(Supplier, Executor)
.static <T,
U> CompletableFuture <List<U>> thenParApplyAsync
(CompletableFuture<? extends Iterable<? extends T>> cfThis, Function<? super T, ? extends U> fn) Shortcut to methodallResultsOf
, processes elements from the result of parameter cfThis in parallel by wrapping each element's function computation into a CompletableFuture usingCompletableFuture.supplyAsync(Supplier, Executor)
with the default executor of parameter cfThis.static <T,
U> CompletableFuture <List<U>> thenParApplyAsync
(CompletableFuture<? extends Iterable<? extends T>> cfThis, Function<? super T, ? extends U> fn, Executor executor) Shortcut to methodallResultsOf
, processes elements from the result of parameter cfThis in parallel by wrapping each element's function computation into a CompletableFuture usingCompletableFuture.supplyAsync(Supplier, Executor)
.static <T,
U> CompletableFuture <List<U>> thenParApplyFailFastAsync
(CompletableFuture<? extends Iterable<? extends T>> cfThis, Function<? super T, ? extends U> fn) Shortcut to methodallResultsFailFastOf
, processes elements from the result of parameter cfThis in parallel by wrapping each element's function computation into a CompletableFuture usingCompletableFuture.supplyAsync(Supplier, Executor)
with the default executor of parameter cfThis.static <T,
U> CompletableFuture <List<U>> thenParApplyFailFastAsync
(CompletableFuture<? extends Iterable<? extends T>> cfThis, Function<? super T, ? extends U> fn, Executor executor) Shortcut to methodallResultsFailFastOf
, processes elements from the result of parameter cfThis in parallel by wrapping each element's function computation into a CompletableFuture usingCompletableFuture.supplyAsync(Supplier, Executor)
.static <T,
U> CompletableFuture <List<U>> thenParApplyMostSuccessAsync
(CompletableFuture<? extends Iterable<? extends T>> cfThis, U valueIfNotSuccess, long timeout, TimeUnit unit, Function<? super T, ? extends U> fn) Shortcut to methodmostSuccessResultsOf
, processes elements from the result of parameter cfThis in parallel by wrapping each element's function computation into a CompletableFuture usingCompletableFuture.supplyAsync(Supplier, Executor)
with the default executor of parameter cfThis.static <T,
U> CompletableFuture <List<U>> thenParApplyMostSuccessAsync
(CompletableFuture<? extends Iterable<? extends T>> cfThis, U valueIfNotSuccess, long timeout, TimeUnit unit, Function<? super T, ? extends U> fn, Executor executor) Shortcut to methodmostSuccessResultsOf
, processes elements from the result of parameter cfThis in parallel by wrapping each element's function computation into a CompletableFuture usingCompletableFuture.supplyAsync(Supplier, Executor)
.
-
Method Details
-
parApplyFailFastAsync
@CheckReturnValue(explanation="should use the returned CompletableFuture; otherwise, prefer simple method `parAcceptAsync`") public static <T,U> CompletableFuture<List<U>> parApplyFailFastAsync(Iterable<? extends T> elements, Function<? super T, ? extends U> fn) Shortcut to methodallResultsFailFastOf
, processes multiple input elements in parallel by wrapping each element's function computation into a CompletableFuture usingCompletableFuture.supplyAsync(Supplier)
.See the
allResultsFailFastOf
documentation for the rules of result computation. -
parApplyFailFastAsync
@CheckReturnValue(explanation="should use the returned CompletableFuture; otherwise, prefer simple method `parAcceptAsync`") public static <T,U> CompletableFuture<List<U>> parApplyFailFastAsync(Iterable<? extends T> elements, Function<? super T, ? extends U> fn, Executor executor) Shortcut to methodallResultsFailFastOf
, processes multiple input elements in parallel by wrapping each element's function computation into a CompletableFuture usingCompletableFuture.supplyAsync(Supplier, Executor)
.See the
allResultsFailFastOf
documentation for the rules of result computation. -
parApplyAllSuccessAsync
@CheckReturnValue(explanation="should use the returned CompletableFuture; otherwise, prefer simple method `parAcceptAsync`") public static <T,U> CompletableFuture<List<U>> parApplyAllSuccessAsync(Iterable<? extends T> elements, @Nullable U valueIfFailed, Function<? super T, ? extends U> fn) Shortcut to methodallSuccessResultsOf
, processes multiple input elements in parallel by wrapping each element's function computation into a CompletableFuture usingCompletableFuture.supplyAsync(Supplier)
.See the
allSuccessResultsOf
documentation for the rules of result computation. -
parApplyAllSuccessAsync
@CheckReturnValue(explanation="should use the returned CompletableFuture; otherwise, prefer simple method `parAcceptAsync`") public static <T,U> CompletableFuture<List<U>> parApplyAllSuccessAsync(Iterable<? extends T> elements, @Nullable U valueIfFailed, Function<? super T, ? extends U> fn, Executor executor) Shortcut to methodallSuccessResultsOf
, processes multiple input elements in parallel by wrapping each element's function computation into a CompletableFuture usingCompletableFuture.supplyAsync(Supplier, Executor)
.See the
allSuccessResultsOf
documentation for the rules of result computation. -
parApplyMostSuccessAsync
@CheckReturnValue(explanation="should use the returned CompletableFuture; otherwise, prefer simple method `parAcceptAsync`") public static <T,U> CompletableFuture<List<U>> parApplyMostSuccessAsync(Iterable<? extends T> elements, @Nullable U valueIfNotSuccess, long timeout, TimeUnit unit, Function<? super T, ? extends U> fn) Shortcut to methodmostSuccessResultsOf
, processes multiple input elements in parallel by wrapping each element's function computation into a CompletableFuture usingCompletableFuture.supplyAsync(Supplier)
.See the
mostSuccessResultsOf
documentation for the rules of result computation. -
parApplyMostSuccessAsync
@CheckReturnValue(explanation="should use the returned CompletableFuture; otherwise, prefer simple method `parAcceptAsync`") public static <T,U> CompletableFuture<List<U>> parApplyMostSuccessAsync(Iterable<? extends T> elements, @Nullable U valueIfNotSuccess, long timeout, TimeUnit unit, Function<? super T, ? extends U> fn, Executor executor) Shortcut to methodmostSuccessResultsOf
, processes multiple input elements in parallel by wrapping each element's function computation into a CompletableFuture usingCompletableFuture.supplyAsync(Supplier, Executor)
.See the
mostSuccessResultsOf
documentation for the rules of result computation. -
parApplyAsync
@CheckReturnValue(explanation="should use the returned CompletableFuture; otherwise, prefer simple method `parAcceptAsync`") public static <T,U> CompletableFuture<List<U>> parApplyAsync(Iterable<? extends T> elements, Function<? super T, ? extends U> fn) Shortcut to methodallResultsOf
, processes multiple input elements in parallel by wrapping each element's function computation into a CompletableFuture usingCompletableFuture.supplyAsync(Supplier)
.See the
allResultsOf
documentation for the rules of result computation. -
parApplyAsync
@CheckReturnValue(explanation="should use the returned CompletableFuture; otherwise, prefer simple method `parAcceptAsync`") public static <T,U> CompletableFuture<List<U>> parApplyAsync(Iterable<? extends T> elements, Function<? super T, ? extends U> fn, Executor executor) Shortcut to methodallResultsOf
, processes multiple input elements in parallel by wrapping each element's function computation into a CompletableFuture usingCompletableFuture.supplyAsync(Supplier, Executor)
.See the
allResultsOf
documentation for the rules of result computation. -
parApplyAnySuccessAsync
@CheckReturnValue(explanation="should use the returned CompletableFuture; otherwise, prefer simple method `parAcceptAsync`") public static <T,U> CompletableFuture<U> parApplyAnySuccessAsync(Iterable<? extends T> elements, Function<? super T, ? extends U> fn) Shortcut to methodanySuccessOf
, processes multiple input elements in parallel by wrapping each element's function computation into a CompletableFuture usingCompletableFuture.supplyAsync(Supplier)
.See the
anySuccessOf
documentation for the rules of result computation. -
parApplyAnySuccessAsync
@CheckReturnValue(explanation="should use the returned CompletableFuture; otherwise, prefer simple method `parAcceptAsync`") public static <T,U> CompletableFuture<U> parApplyAnySuccessAsync(Iterable<? extends T> elements, Function<? super T, ? extends U> fn, Executor executor) Shortcut to methodanySuccessOf
, processes multiple input elements in parallel by wrapping each element's function computation into a CompletableFuture usingCompletableFuture.supplyAsync(Supplier, Executor)
.See the
anySuccessOf
documentation for the rules of result computation. -
parApplyAnyAsync
@CheckReturnValue(explanation="should use the returned CompletableFuture; otherwise, prefer simple method `parAcceptAsync`") public static <T,U> CompletableFuture<U> parApplyAnyAsync(Iterable<? extends T> elements, Function<? super T, ? extends U> fn) Shortcut to methodanyOf
, processes multiple input elements in parallel by wrapping each element's function computation into a CompletableFuture usingCompletableFuture.supplyAsync(Supplier)
.See the
anyOf
documentation for the rules of result computation. -
parApplyAnyAsync
@CheckReturnValue(explanation="should use the returned CompletableFuture; otherwise, prefer simple method `parAcceptAsync`") public static <T,U> CompletableFuture<U> parApplyAnyAsync(Iterable<? extends T> elements, Function<? super T, ? extends U> fn, Executor executor) Shortcut to methodanyOf
, processes multiple input elements in parallel by wrapping each element's function computation into a CompletableFuture usingCompletableFuture.supplyAsync(Supplier, Executor)
.See the
anyOf
documentation for the rules of result computation. -
parAcceptFailFastAsync
@CheckReturnValue(explanation="should use the returned CompletableFuture; otherwise, prefer simple method `parAcceptAsync`") public static <T> CompletableFuture<Void> parAcceptFailFastAsync(Iterable<? extends T> elements, Consumer<? super T> action) Shortcut to methodallResultsFailFastOf
, processes multiple input elements in parallel by wrapping each element's action computation into a CompletableFuture usingCompletableFuture.runAsync(Runnable)
.See the
allResultsFailFastOf
documentation for the rules of result computation. -
parAcceptFailFastAsync
@CheckReturnValue(explanation="should use the returned CompletableFuture; otherwise, prefer simple method `parAcceptAsync`") public static <T> CompletableFuture<Void> parAcceptFailFastAsync(Iterable<? extends T> elements, Consumer<? super T> action, Executor executor) Shortcut to methodallResultsFailFastOf
, processes multiple input elements in parallel by wrapping each element's action computation into a CompletableFuture usingCompletableFuture.runAsync(Runnable, Executor)
.See the
allResultsFailFastOf
documentation for the rules of result computation. -
parAcceptAsync
public static <T> CompletableFuture<Void> parAcceptAsync(Iterable<? extends T> elements, Consumer<? super T> action) Shortcut to methodallOf
, processes multiple input elements in parallel by wrapping each element's action computation into a CompletableFuture usingCompletableFuture.runAsync(Runnable)
.See the
allOf
documentation for the rules of result computation. -
parAcceptAsync
public static <T> CompletableFuture<Void> parAcceptAsync(Iterable<? extends T> elements, Consumer<? super T> action, Executor executor) Shortcut to methodallOf
, processes multiple input elements in parallel by wrapping each element's action computation into a CompletableFuture usingCompletableFuture.runAsync(Runnable, Executor)
.See the
allOf
documentation for the rules of result computation. -
parAcceptAnySuccessAsync
@CheckReturnValue(explanation="should use the returned CompletableFuture; otherwise, prefer simple method `parAcceptAsync`") public static <T> CompletableFuture<Void> parAcceptAnySuccessAsync(Iterable<? extends T> elements, Consumer<? super T> action) Shortcut to methodanySuccessOf
, processes multiple input elements in parallel by wrapping each element's action computation into a CompletableFuture usingCompletableFuture.runAsync(Runnable)
.See the
anySuccessOf
documentation for the rules of result computation. -
parAcceptAnySuccessAsync
@CheckReturnValue(explanation="should use the returned CompletableFuture; otherwise, prefer simple method `parAcceptAsync`") public static <T> CompletableFuture<Void> parAcceptAnySuccessAsync(Iterable<? extends T> elements, Consumer<? super T> action, Executor executor) Shortcut to methodanySuccessOf
, processes multiple input elements in parallel by wrapping each element's action computation into a CompletableFuture usingCompletableFuture.runAsync(Runnable, Executor)
.See the
anySuccessOf
documentation for the rules of result computation. -
parAcceptAnyAsync
@CheckReturnValue(explanation="should use the returned CompletableFuture; otherwise, prefer simple method `parAcceptAsync`") public static <T> CompletableFuture<Void> parAcceptAnyAsync(Iterable<? extends T> elements, Consumer<? super T> action) Shortcut to methodanyOf
, processes multiple input elements in parallel by wrapping each element's action computation into a CompletableFuture usingCompletableFuture.runAsync(Runnable)
.See the
anyOf
documentation for the rules of result computation. -
parAcceptAnyAsync
@CheckReturnValue(explanation="should use the returned CompletableFuture; otherwise, prefer simple method `parAcceptAsync`") public static <T> CompletableFuture<Void> parAcceptAnyAsync(Iterable<? extends T> elements, Consumer<? super T> action, Executor executor) Shortcut to methodanyOf
, processes multiple input elements in parallel by wrapping each element's action computation into a CompletableFuture usingCompletableFuture.runAsync(Runnable, Executor)
.See the
anyOf
documentation for the rules of result computation. -
thenParApplyFailFastAsync
@CheckReturnValue(explanation="should use the returned CompletableFuture; otherwise, prefer simple method `thenParAcceptAsync`") public static <T,U> CompletableFuture<List<U>> thenParApplyFailFastAsync(CompletableFuture<? extends Iterable<? extends T>> cfThis, Function<? super T, ? extends U> fn) Shortcut to methodallResultsFailFastOf
, processes elements from the result of parameter cfThis in parallel by wrapping each element's function computation into a CompletableFuture usingCompletableFuture.supplyAsync(Supplier, Executor)
with the default executor of parameter cfThis.See the
allResultsFailFastOf
documentation for the rules of result computation. -
thenParApplyFailFastAsync
@CheckReturnValue(explanation="should use the returned CompletableFuture; otherwise, prefer simple method `thenParAcceptAsync`") public static <T,U> CompletableFuture<List<U>> thenParApplyFailFastAsync(CompletableFuture<? extends Iterable<? extends T>> cfThis, Function<? super T, ? extends U> fn, Executor executor) Shortcut to methodallResultsFailFastOf
, processes elements from the result of parameter cfThis in parallel by wrapping each element's function computation into a CompletableFuture usingCompletableFuture.supplyAsync(Supplier, Executor)
.See the
allResultsFailFastOf
documentation for the rules of result computation. -
thenParApplyAllSuccessAsync
@CheckReturnValue(explanation="should use the returned CompletableFuture; otherwise, prefer simple method `thenParAcceptAsync`") public static <T,U> CompletableFuture<List<U>> thenParApplyAllSuccessAsync(CompletableFuture<? extends Iterable<? extends T>> cfThis, @Nullable U valueIfFailed, Function<? super T, ? extends U> fn) Shortcut to methodallSuccessResultsOf
, processes elements from the result of parameter cfThis in parallel by wrapping each element's function computation into a CompletableFuture usingCompletableFuture.supplyAsync(Supplier, Executor)
with the default executor of parameter cfThis.See the
allSuccessResultsOf
documentation for the rules of result computation. -
thenParApplyAllSuccessAsync
@CheckReturnValue(explanation="should use the returned CompletableFuture; otherwise, prefer simple method `thenParAcceptAsync`") public static <T,U> CompletableFuture<List<U>> thenParApplyAllSuccessAsync(CompletableFuture<? extends Iterable<? extends T>> cfThis, @Nullable U valueIfFailed, Function<? super T, ? extends U> fn, Executor executor) Shortcut to methodallSuccessResultsOf
, processes elements from the result of parameter cfThis in parallel by wrapping each element's function computation into a CompletableFuture usingCompletableFuture.supplyAsync(Supplier, Executor)
.See the
allSuccessResultsOf
documentation for the rules of result computation. -
thenParApplyMostSuccessAsync
@CheckReturnValue(explanation="should use the returned CompletableFuture; otherwise, prefer simple method `thenParAcceptAsync`") public static <T,U> CompletableFuture<List<U>> thenParApplyMostSuccessAsync(CompletableFuture<? extends Iterable<? extends T>> cfThis, @Nullable U valueIfNotSuccess, long timeout, TimeUnit unit, Function<? super T, ? extends U> fn) Shortcut to methodmostSuccessResultsOf
, processes elements from the result of parameter cfThis in parallel by wrapping each element's function computation into a CompletableFuture usingCompletableFuture.supplyAsync(Supplier, Executor)
with the default executor of parameter cfThis.See the
mostSuccessResultsOf
documentation for the rules of result computation. -
thenParApplyMostSuccessAsync
@CheckReturnValue(explanation="should use the returned CompletableFuture; otherwise, prefer simple method `thenParAcceptAsync`") public static <T,U> CompletableFuture<List<U>> thenParApplyMostSuccessAsync(CompletableFuture<? extends Iterable<? extends T>> cfThis, @Nullable U valueIfNotSuccess, long timeout, TimeUnit unit, Function<? super T, ? extends U> fn, Executor executor) Shortcut to methodmostSuccessResultsOf
, processes elements from the result of parameter cfThis in parallel by wrapping each element's function computation into a CompletableFuture usingCompletableFuture.supplyAsync(Supplier, Executor)
.See the
mostSuccessResultsOf
documentation for the rules of result computation. -
thenParApplyAsync
@CheckReturnValue(explanation="should use the returned CompletableFuture; otherwise, prefer simple method `thenParAcceptAsync`") public static <T,U> CompletableFuture<List<U>> thenParApplyAsync(CompletableFuture<? extends Iterable<? extends T>> cfThis, Function<? super T, ? extends U> fn) Shortcut to methodallResultsOf
, processes elements from the result of parameter cfThis in parallel by wrapping each element's function computation into a CompletableFuture usingCompletableFuture.supplyAsync(Supplier, Executor)
with the default executor of parameter cfThis.See the
allResultsOf
documentation for the rules of result computation. -
thenParApplyAsync
@CheckReturnValue(explanation="should use the returned CompletableFuture; otherwise, prefer simple method `thenParAcceptAsync`") public static <T,U> CompletableFuture<List<U>> thenParApplyAsync(CompletableFuture<? extends Iterable<? extends T>> cfThis, Function<? super T, ? extends U> fn, Executor executor) Shortcut to methodallResultsOf
, processes elements from the result of parameter cfThis in parallel by wrapping each element's function computation into a CompletableFuture usingCompletableFuture.supplyAsync(Supplier, Executor)
.See the
allResultsOf
documentation for the rules of result computation. -
thenParApplyAnySuccessAsync
@CheckReturnValue(explanation="should use the returned CompletableFuture; otherwise, prefer simple method `thenParAcceptAsync`") public static <T,U> CompletableFuture<U> thenParApplyAnySuccessAsync(CompletableFuture<? extends Iterable<? extends T>> cfThis, Function<? super T, ? extends U> fn) Shortcut to methodanySuccessOf
, processes elements from the result of parameter cfThis in parallel by wrapping each element's function computation into a CompletableFuture usingCompletableFuture.supplyAsync(Supplier, Executor)
with the default executor of parameter cfThis.See the
anySuccessOf
documentation for the rules of result computation. -
thenParApplyAnySuccessAsync
@CheckReturnValue(explanation="should use the returned CompletableFuture; otherwise, prefer simple method `thenParAcceptAsync`") public static <T,U> CompletableFuture<U> thenParApplyAnySuccessAsync(CompletableFuture<? extends Iterable<? extends T>> cfThis, Function<? super T, ? extends U> fn, Executor executor) Shortcut to methodanySuccessOf
, processes elements from the result of parameter cfThis in parallel by wrapping each element's function computation into a CompletableFuture usingCompletableFuture.supplyAsync(Supplier, Executor)
.See the
anySuccessOf
documentation for the rules of result computation. -
thenParApplyAnyAsync
@CheckReturnValue(explanation="should use the returned CompletableFuture; otherwise, prefer simple method `thenParAcceptAsync`") public static <T,U> CompletableFuture<U> thenParApplyAnyAsync(CompletableFuture<? extends Iterable<? extends T>> cfThis, Function<? super T, ? extends U> fn) Shortcut to methodanyOf
, processes elements from the result of parameter cfThis in parallel by wrapping each element's function computation into a CompletableFuture usingCompletableFuture.supplyAsync(Supplier, Executor)
with the default executor of parameter cfThis.See the
anyOf
documentation for the rules of result computation. -
thenParApplyAnyAsync
@CheckReturnValue(explanation="should use the returned CompletableFuture; otherwise, prefer simple method `thenParAcceptAsync`") public static <T,U> CompletableFuture<U> thenParApplyAnyAsync(CompletableFuture<? extends Iterable<? extends T>> cfThis, Function<? super T, ? extends U> fn, Executor executor) Shortcut to methodanyOf
, processes elements from the result of parameter cfThis in parallel by wrapping each element's function computation into a CompletableFuture usingCompletableFuture.supplyAsync(Supplier, Executor)
.See the
anyOf
documentation for the rules of result computation. -
thenParAcceptFailFastAsync
@CheckReturnValue(explanation="should use the returned CompletableFuture; otherwise, prefer simple method `thenParAcceptAsync`") public static <T> CompletableFuture<Void> thenParAcceptFailFastAsync(CompletableFuture<? extends Iterable<? extends T>> cfThis, Consumer<? super T> action) Shortcut to methodallResultsFailFastOf
, processes elements from the result of parameter cfThis in parallel by wrapping each element's action computation into a CompletableFuture usingCompletableFuture.runAsync(Runnable, Executor)
with the default executor of parameter cfThis.See the
allResultsFailFastOf
documentation for the rules of result computation. -
thenParAcceptFailFastAsync
@CheckReturnValue(explanation="should use the returned CompletableFuture; otherwise, prefer simple method `thenParAcceptAsync`") public static <T> CompletableFuture<Void> thenParAcceptFailFastAsync(CompletableFuture<? extends Iterable<? extends T>> cfThis, Consumer<? super T> action, Executor executor) Shortcut to methodallResultsFailFastOf
, processes elements from the result of parameter cfThis in parallel by wrapping each element's action computation into a CompletableFuture usingCompletableFuture.runAsync(Runnable, Executor)
.See the
allResultsFailFastOf
documentation for the rules of result computation. -
thenParAcceptAsync
public static <T> CompletableFuture<Void> thenParAcceptAsync(CompletableFuture<? extends Iterable<? extends T>> cfThis, Consumer<? super T> action) Shortcut to methodallOf
, processes elements from the result of parameter cfThis in parallel by wrapping each element's action computation into a CompletableFuture usingCompletableFuture.runAsync(Runnable, Executor)
with the default executor of parameter cfThis.See the
allOf
documentation for the rules of result computation. -
thenParAcceptAsync
public static <T> CompletableFuture<Void> thenParAcceptAsync(CompletableFuture<? extends Iterable<? extends T>> cfThis, Consumer<? super T> action, Executor executor) Shortcut to methodallOf
, processes elements from the result of parameter cfThis in parallel by wrapping each element's action computation into a CompletableFuture usingCompletableFuture.runAsync(Runnable, Executor)
.See the
allOf
documentation for the rules of result computation. -
thenParAcceptAnySuccessAsync
@CheckReturnValue(explanation="should use the returned CompletableFuture; otherwise, prefer simple method `thenParAcceptAsync`") public static <T> CompletableFuture<Void> thenParAcceptAnySuccessAsync(CompletableFuture<? extends Iterable<? extends T>> cfThis, Consumer<? super T> action) Shortcut to methodanySuccessOf
, processes elements from the result of parameter cfThis in parallel by wrapping each element's action computation into a CompletableFuture usingCompletableFuture.runAsync(Runnable, Executor)
with the default executor of parameter cfThis.See the
anySuccessOf
documentation for the rules of result computation. -
thenParAcceptAnySuccessAsync
@CheckReturnValue(explanation="should use the returned CompletableFuture; otherwise, prefer simple method `thenParAcceptAsync`") public static <T> CompletableFuture<Void> thenParAcceptAnySuccessAsync(CompletableFuture<? extends Iterable<? extends T>> cfThis, Consumer<? super T> action, Executor executor) Shortcut to methodanySuccessOf
, processes elements from the result of parameter cfThis in parallel by wrapping each element's action computation into a CompletableFuture usingCompletableFuture.runAsync(Runnable, Executor)
.See the
anySuccessOf
documentation for the rules of result computation. -
thenParAcceptAnyAsync
@CheckReturnValue(explanation="should use the returned CompletableFuture; otherwise, prefer simple method `thenParAcceptAsync`") public static <T> CompletableFuture<Void> thenParAcceptAnyAsync(CompletableFuture<? extends Iterable<? extends T>> cfThis, Consumer<? super T> action) Shortcut to methodanyOf
, processes elements from the result of parameter cfThis in parallel by wrapping each element's action computation into a CompletableFuture usingCompletableFuture.runAsync(Runnable, Executor)
with the default executor of parameter cfThis.See the
anyOf
documentation for the rules of result computation. -
thenParAcceptAnyAsync
@CheckReturnValue(explanation="should use the returned CompletableFuture; otherwise, prefer simple method `thenParAcceptAsync`") public static <T> CompletableFuture<Void> thenParAcceptAnyAsync(CompletableFuture<? extends Iterable<? extends T>> cfThis, Consumer<? super T> action, Executor executor) Shortcut to methodanyOf
, processes elements from the result of parameter cfThis in parallel by wrapping each element's action computation into a CompletableFuture usingCompletableFuture.runAsync(Runnable, Executor)
.See the
anyOf
documentation for the rules of result computation.
-