Class ActorFutureCollector<V>

java.lang.Object
io.camunda.zeebe.scheduler.future.ActorFutureCollector<V>
Type Parameters:
V - type of the value of each future
All Implemented Interfaces:
Collector<ActorFuture<V>,List<ActorFuture<V>>,ActorFuture<List<V>>>

public final class ActorFutureCollector<V> extends Object implements Collector<ActorFuture<V>,List<ActorFuture<V>>,ActorFuture<List<V>>>
Aggregates a number of ActorFuture objects into a single one. The aggregated future is completed when all individual futures have completed. If all futures complete with a value, the aggregated future returns the ordered list of said values. If one or more complete exceptionally, the aggregated future will complete exceptionally. The exception will have the exceptions of the individual futures aas suppressed exceptions. If exceptions occur, this does not interrupt the individual futures.
 var aggregated = of(future1, future2).stream().collect(new ActorFutureCollectorinvalid input: '<'>(concurrencyControl));