@Override public void onFatalError(Exception e) { HazelcastThreadGroup threadGroup = node.getHazelcastThreadGroup(); Thread thread = new Thread( threadGroup.getInternalThreadGroup(), threadGroup.getThreadNamePrefix("io.error.shutdown")) { public void run() { node.shutdown(false); } }; thread.start(); }
public OperationServiceImpl(NodeEngineImpl nodeEngine) { this.nodeEngine = nodeEngine; this.node = nodeEngine.getNode(); this.thisAddress = node.getThisAddress(); this.logger = node.getLogger(OperationService.class); this.serializationService = (InternalSerializationService) nodeEngine.getSerializationService(); this.backpressureRegulator = new BackpressureRegulator( node.getProperties(), node.getLogger(BackpressureRegulator.class)); int coreSize = Runtime.getRuntime().availableProcessors(); boolean reallyMultiCore = coreSize >= CORE_SIZE_CHECK; int concurrencyLevel = reallyMultiCore ? coreSize * CORE_SIZE_FACTOR : CONCURRENCY_LEVEL; this.invocationRegistry = new InvocationRegistry( node.getLogger(OperationServiceImpl.class), backpressureRegulator.newCallIdSequence(), concurrencyLevel); this.invocationMonitor = new InvocationMonitor( nodeEngine, thisAddress, node.getHazelcastThreadGroup(), node.getProperties(), invocationRegistry, node.getLogger(InvocationMonitor.class), serializationService, nodeEngine.getServiceManager()); this.operationBackupHandler = new OperationBackupHandler(this); this.responseHandler = new ResponseHandler( node.getLogger(ResponseHandler.class), node.getSerializationService(), invocationRegistry, nodeEngine); this.asyncResponseHandler = new AsyncResponseHandler( node.getHazelcastThreadGroup(), node.getLogger(AsyncResponseHandler.class), responseHandler, node.getProperties()); this.operationExecutor = new OperationExecutorImpl( node.getProperties(), node.loggingService, thisAddress, new OperationRunnerFactoryImpl(this), node.getHazelcastThreadGroup(), node.getNodeExtension()); this.slowOperationDetector = new SlowOperationDetector( node.loggingService, operationExecutor.getGenericOperationRunners(), operationExecutor.getPartitionOperationRunners(), node.getProperties(), node.getHazelcastThreadGroup()); }
@Override public ThreadGroup getThreadGroup() { HazelcastThreadGroup threadGroup = node.getHazelcastThreadGroup(); return threadGroup.getInternalThreadGroup(); }
@Override public String getThreadPrefix() { HazelcastThreadGroup threadGroup = node.getHazelcastThreadGroup(); return threadGroup.getThreadPoolNamePrefix("IO"); }