public class ParallelAccumulationExecutor extends Object implements AccumulationExecutor
AccumulationExecutor
that runs the accumulation in a multi-threaded way.
Entries are split into chunks and each chunk is sent as a task to the underlying executor.
At the end the result is merged to a single AggregationResult.Constructor and Description |
---|
ParallelAccumulationExecutor(ManagedExecutorService executor,
SerializationService serializationService,
int callTimeoutInMillis) |
Modifier and Type | Method and Description |
---|---|
protected Collection<Aggregator> |
accumulateParallel(Aggregator aggregator,
Collection<QueryableEntry> entries) |
AggregationResult |
execute(Aggregator aggregator,
Collection<QueryableEntry> entries,
Collection<Integer> partitionIds) |
public ParallelAccumulationExecutor(ManagedExecutorService executor, SerializationService serializationService, int callTimeoutInMillis)
public AggregationResult execute(Aggregator aggregator, Collection<QueryableEntry> entries, Collection<Integer> partitionIds)
execute
in interface AccumulationExecutor
aggregator
- Instance of aggregator using which the entries should be accumulated (it will not be modified)entries
- Entries to be accumulatedpartitionIds
- IDs of the partitions where the entries resideprotected Collection<Aggregator> accumulateParallel(Aggregator aggregator, Collection<QueryableEntry> entries)
Copyright © 2020 Hazelcast, Inc.. All Rights Reserved.