use of com.hazelcast.internal.server.tcp.TcpServerConnectionChannelErrorHandler in project hazelcast by hazelcast.
the class DefaultNodeContext method createNetworking.
private Networking createNetworking(Node node) {
LoggingServiceImpl loggingService = node.loggingService;
ILogger logger = loggingService.getLogger(TcpServerConnectionChannelErrorHandler.class);
ChannelErrorHandler errorHandler = new TcpServerConnectionChannelErrorHandler(logger);
HazelcastProperties props = node.getProperties();
return new NioNetworking(new NioNetworking.Context().loggingService(loggingService).metricsRegistry(node.nodeEngine.getMetricsRegistry()).threadNamePrefix(node.hazelcastInstance.getName()).errorHandler(errorHandler).inputThreadCount(props.getInteger(IO_INPUT_THREAD_COUNT)).inputThreadAffinity(newSystemThreadAffinity("hazelcast.io.input.thread.affinity")).outputThreadCount(props.getInteger(IO_OUTPUT_THREAD_COUNT)).outputThreadAffinity(newSystemThreadAffinity("hazelcast.io.output.thread.affinity")).balancerIntervalSeconds(props.getInteger(IO_BALANCER_INTERVAL_SECONDS)).writeThroughEnabled(props.getBoolean(IO_WRITE_THROUGH_ENABLED)).concurrencyDetection(node.nodeEngine.getConcurrencyDetection()));
}
use of com.hazelcast.internal.server.tcp.TcpServerConnectionChannelErrorHandler in project hazelcast by hazelcast.
the class SelectNow_NioNetworkingFactory method create.
@Override
public NioNetworking create(final MockServerContext serverContext, MetricsRegistry metricsRegistry) {
LoggingService loggingService = serverContext.loggingService;
HazelcastProperties properties = serverContext.properties();
return new NioNetworking(new NioNetworking.Context().loggingService(loggingService).metricsRegistry(metricsRegistry).threadNamePrefix(serverContext.getHazelcastName()).errorHandler(new TcpServerConnectionChannelErrorHandler(loggingService.getLogger(TcpServerConnectionChannelErrorHandler.class))).inputThreadCount(properties.getInteger(IO_INPUT_THREAD_COUNT)).outputThreadCount(properties.getInteger(IO_OUTPUT_THREAD_COUNT)).balancerIntervalSeconds(properties.getInteger(IO_BALANCER_INTERVAL_SECONDS)).selectorMode(SelectorMode.SELECT_NOW));
}
use of com.hazelcast.internal.server.tcp.TcpServerConnectionChannelErrorHandler in project hazelcast by hazelcast.
the class Select_NioNetworkingFactory method create.
@Override
public NioNetworking create(final MockServerContext serverContext, MetricsRegistry metricsRegistry) {
HazelcastProperties properties = serverContext.properties();
LoggingService loggingService = serverContext.loggingService;
return new NioNetworking(new NioNetworking.Context().loggingService(loggingService).metricsRegistry(metricsRegistry).threadNamePrefix(serverContext.getHazelcastName()).errorHandler(new TcpServerConnectionChannelErrorHandler(loggingService.getLogger(TcpServerConnectionChannelErrorHandler.class))).inputThreadCount(properties.getInteger(IO_INPUT_THREAD_COUNT)).outputThreadCount(properties.getInteger(IO_OUTPUT_THREAD_COUNT)).balancerIntervalSeconds(properties.getInteger(IO_BALANCER_INTERVAL_SECONDS)).selectorMode(SelectorMode.SELECT));
}
use of com.hazelcast.internal.server.tcp.TcpServerConnectionChannelErrorHandler in project hazelcast by hazelcast.
the class SelectWithSelectorFix_NioNetworkingFactory method create.
@Override
public NioNetworking create(final MockServerContext serverContext, MetricsRegistry metricsRegistry) {
HazelcastProperties properties = serverContext.properties();
LoggingService loggingService = serverContext.loggingService;
return new NioNetworking(new NioNetworking.Context().loggingService(loggingService).metricsRegistry(metricsRegistry).threadNamePrefix(serverContext.getHazelcastName()).errorHandler(new TcpServerConnectionChannelErrorHandler(loggingService.getLogger(TcpServerConnectionChannelErrorHandler.class))).inputThreadCount(properties.getInteger(IO_INPUT_THREAD_COUNT)).outputThreadCount(properties.getInteger(IO_OUTPUT_THREAD_COUNT)).balancerIntervalSeconds(properties.getInteger(IO_BALANCER_INTERVAL_SECONDS)).selectorMode(SelectorMode.SELECT_WITH_FIX).selectorWorkaroundTest(true));
}
Aggregations