Search in sources :

Example 1 with CallerRunsAccumulationExecutor

use of com.hazelcast.map.impl.query.CallerRunsAccumulationExecutor 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, nodeEngine.getSerializationService());
}
Also used : ManagedExecutorService(com.hazelcast.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

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 ManagedExecutorService (com.hazelcast.util.executor.ManagedExecutorService)1