Search in sources :

Example 1 with ParallelAccumulationExecutor

use of com.hazelcast.map.impl.query.ParallelAccumulationExecutor in project hazelcast by hazelcast.

the class MapServiceContextImpl method createAggregationResultProcessor.

private AggregationResultProcessor createAggregationResultProcessor(SerializationService ss) {
    boolean parallelAccumulation = nodeEngine.getProperties().getBoolean(AGGREGATION_ACCUMULATION_PARALLEL_EVALUATION);
    int opTimeoutInMillis = nodeEngine.getProperties().getInteger(OPERATION_CALL_TIMEOUT_MILLIS);
    AccumulationExecutor accumulationExecutor;
    if (parallelAccumulation) {
        ManagedExecutorService queryExecutorService = nodeEngine.getExecutionService().getExecutor(QUERY_EXECUTOR);
        accumulationExecutor = new ParallelAccumulationExecutor(queryExecutorService, ss, opTimeoutInMillis);
    } else {
        accumulationExecutor = new CallerRunsAccumulationExecutor(ss);
    }
    return new AggregationResultProcessor(accumulationExecutor, serializationService);
}
Also used : ManagedExecutorService(com.hazelcast.internal.util.executor.ManagedExecutorService) ParallelAccumulationExecutor(com.hazelcast.map.impl.query.ParallelAccumulationExecutor) CallerRunsAccumulationExecutor(com.hazelcast.map.impl.query.CallerRunsAccumulationExecutor) AccumulationExecutor(com.hazelcast.map.impl.query.AccumulationExecutor) CallerRunsAccumulationExecutor(com.hazelcast.map.impl.query.CallerRunsAccumulationExecutor) ParallelAccumulationExecutor(com.hazelcast.map.impl.query.ParallelAccumulationExecutor) AggregationResultProcessor(com.hazelcast.map.impl.query.AggregationResultProcessor)

Aggregations

ManagedExecutorService (com.hazelcast.internal.util.executor.ManagedExecutorService)1 AccumulationExecutor (com.hazelcast.map.impl.query.AccumulationExecutor)1 AggregationResultProcessor (com.hazelcast.map.impl.query.AggregationResultProcessor)1 CallerRunsAccumulationExecutor (com.hazelcast.map.impl.query.CallerRunsAccumulationExecutor)1 ParallelAccumulationExecutor (com.hazelcast.map.impl.query.ParallelAccumulationExecutor)1