private OperationRunner[] initGenericOperationRunners(HazelcastProperties properties, OperationRunnerFactory runnerFactory) { int threadCount = properties.getInteger(GENERIC_OPERATION_THREAD_COUNT); if (threadCount <= 0) { // default generic operation thread count int coreSize = RuntimeAvailableProcessors.get(); threadCount = Math.max(2, coreSize / 2); } OperationRunner[] operationRunners = new OperationRunner[threadCount + priorityThreadCount]; for (int partitionId = 0; partitionId < operationRunners.length; partitionId++) { operationRunners[partitionId] = runnerFactory.createGenericRunner(); } return operationRunners; }
private OperationRunner[] initPartitionOperationRunners(HazelcastProperties properties, OperationRunnerFactory runnerFactory) { OperationRunner[] operationRunners = new OperationRunner[properties.getInteger(PARTITION_COUNT)]; for (int partitionId = 0; partitionId < operationRunners.length; partitionId++) { operationRunners[partitionId] = runnerFactory.createPartitionRunner(partitionId); } return operationRunners; }
public OperationExecutorImpl(HazelcastProperties properties, LoggingService loggerService, Address thisAddress, OperationRunnerFactory runnerFactory, NodeExtension nodeExtension, String hzName, ClassLoader configClassLoader) { this.thisAddress = thisAddress; this.logger = loggerService.getLogger(OperationExecutorImpl.class); this.adHocOperationRunner = runnerFactory.createAdHocRunner(); this.partitionOperationRunners = initPartitionOperationRunners(properties, runnerFactory); this.partitionThreads = initPartitionThreads(properties, hzName, nodeExtension, configClassLoader); this.priorityThreadCount = properties.getInteger(PRIORITY_GENERIC_OPERATION_THREAD_COUNT); this.genericOperationRunners = initGenericOperationRunners(properties, runnerFactory); this.genericThreads = initGenericThreads(hzName, nodeExtension, configClassLoader); }
public OperationExecutorImpl(HazelcastProperties properties, LoggingService loggerService, Address thisAddress, OperationRunnerFactory runnerFactory, NodeExtension nodeExtension, String hzName, ClassLoader configClassLoader) { this.thisAddress = thisAddress; this.logger = loggerService.getLogger(OperationExecutorImpl.class); this.adHocOperationRunner = runnerFactory.createAdHocRunner(); this.partitionOperationRunners = initPartitionOperationRunners(properties, runnerFactory); this.partitionThreads = initPartitionThreads(properties, hzName, nodeExtension, configClassLoader); this.priorityThreadCount = properties.getInteger(PRIORITY_GENERIC_OPERATION_THREAD_COUNT); this.genericOperationRunners = initGenericOperationRunners(properties, runnerFactory); this.genericThreads = initGenericThreads(hzName, nodeExtension, configClassLoader); }
private OperationRunner[] initPartitionOperationRunners(HazelcastProperties properties, OperationRunnerFactory runnerFactory) { OperationRunner[] operationRunners = new OperationRunner[properties.getInteger(PARTITION_COUNT)]; for (int partitionId = 0; partitionId < operationRunners.length; partitionId++) { operationRunners[partitionId] = runnerFactory.createPartitionRunner(partitionId); } return operationRunners; }
private OperationRunner[] initGenericOperationRunners(HazelcastProperties properties, OperationRunnerFactory runnerFactory) { int threadCount = properties.getInteger(GENERIC_OPERATION_THREAD_COUNT); if (threadCount <= 0) { // default generic operation thread count int coreSize = RuntimeAvailableProcessors.get(); threadCount = Math.max(2, coreSize / 2); } OperationRunner[] operationRunners = new OperationRunner[threadCount + priorityThreadCount]; for (int partitionId = 0; partitionId < operationRunners.length; partitionId++) { operationRunners[partitionId] = runnerFactory.createGenericRunner(); } return operationRunners; }