Class CfParallelUtils

java.lang.Object
io.foldright.cffu2.CfParallelUtils

public final class CfParallelUtils extends Object
Utility class for async parallel data processing using CompletableFuture.

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: