use of com.hazelcast.nio.tcp.SocketReaderInitializerImpl in project hazelcast by hazelcast.
the class DefaultNodeContext method createTcpIpConnectionThreadingModel.
private IOThreadingModel createTcpIpConnectionThreadingModel(Node node, NodeIOService ioService) {
boolean spinning = Boolean.getBoolean("hazelcast.io.spinning");
LoggingServiceImpl loggingService = node.loggingService;
SocketWriterInitializerImpl socketWriterInitializer = new SocketWriterInitializerImpl(loggingService.getLogger(SocketWriterInitializerImpl.class));
SocketReaderInitializerImpl socketReaderInitializer = new SocketReaderInitializerImpl(loggingService.getLogger(SocketReaderInitializerImpl.class));
if (spinning) {
return new SpinningIOThreadingModel(loggingService, node.getHazelcastThreadGroup(), ioService.getIoOutOfMemoryHandler(), socketWriterInitializer, socketReaderInitializer);
} else {
return new NonBlockingIOThreadingModel(loggingService, node.nodeEngine.getMetricsRegistry(), node.getHazelcastThreadGroup(), ioService.getIoOutOfMemoryHandler(), ioService.getInputSelectorThreadCount(), ioService.getOutputSelectorThreadCount(), ioService.getBalancerIntervalSeconds(), socketWriterInitializer, socketReaderInitializer);
}
}
use of com.hazelcast.nio.tcp.SocketReaderInitializerImpl in project hazelcast by hazelcast.
the class SelectNow_NonBlockingIOThreadingModelFactory method create.
@Override
public NonBlockingIOThreadingModel create(MockIOService ioService, MetricsRegistry metricsRegistry) {
LoggingServiceImpl loggingService = ioService.loggingService;
NonBlockingIOThreadingModel threadingModel = new NonBlockingIOThreadingModel(loggingService, metricsRegistry, ioService.hazelcastThreadGroup, ioService.getIoOutOfMemoryHandler(), ioService.getInputSelectorThreadCount(), ioService.getOutputSelectorThreadCount(), ioService.getBalancerIntervalSeconds(), new SocketWriterInitializerImpl(loggingService.getLogger(SocketWriterInitializerImpl.class)), new SocketReaderInitializerImpl(loggingService.getLogger(SocketReaderInitializerImpl.class)));
threadingModel.setSelectorMode(SelectorMode.SELECT_NOW);
return threadingModel;
}
use of com.hazelcast.nio.tcp.SocketReaderInitializerImpl in project hazelcast by hazelcast.
the class SelectWithSelectorFix_NonBlockingIOThreadingModelFactory method create.
@Override
public NonBlockingIOThreadingModel create(MockIOService ioService, MetricsRegistry metricsRegistry) {
LoggingServiceImpl loggingService = ioService.loggingService;
NonBlockingIOThreadingModel threadingModel = new NonBlockingIOThreadingModel(loggingService, metricsRegistry, ioService.hazelcastThreadGroup, ioService.getIoOutOfMemoryHandler(), ioService.getInputSelectorThreadCount(), ioService.getOutputSelectorThreadCount(), ioService.getBalancerIntervalSeconds(), new SocketWriterInitializerImpl(loggingService.getLogger(SocketWriterInitializerImpl.class)), new SocketReaderInitializerImpl(loggingService.getLogger(SocketReaderInitializerImpl.class)));
threadingModel.setSelectorMode(SelectorMode.SELECT_WITH_FIX);
threadingModel.setSelectorWorkaroundTest(true);
return threadingModel;
}
use of com.hazelcast.nio.tcp.SocketReaderInitializerImpl in project hazelcast by hazelcast.
the class Select_NonBlockingIOThreadingModelFactory method create.
@Override
public NonBlockingIOThreadingModel create(MockIOService ioService, MetricsRegistry metricsRegistry) {
LoggingService loggingService = ioService.loggingService;
NonBlockingIOThreadingModel threadingModel = new NonBlockingIOThreadingModel(loggingService, metricsRegistry, ioService.hazelcastThreadGroup, ioService.getIoOutOfMemoryHandler(), ioService.getInputSelectorThreadCount(), ioService.getOutputSelectorThreadCount(), ioService.getBalancerIntervalSeconds(), new SocketWriterInitializerImpl(loggingService.getLogger(SocketWriterInitializerImpl.class)), new SocketReaderInitializerImpl(loggingService.getLogger(SocketReaderInitializerImpl.class)));
threadingModel.setSelectorMode(SelectorMode.SELECT);
return threadingModel;
}
Aggregations