Search in sources :

Example 1 with ChannelErrorHandler

use of com.hazelcast.internal.networking.ChannelErrorHandler 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()));
}
Also used : TcpServerContext(com.hazelcast.internal.server.tcp.TcpServerContext) HazelcastProperties(com.hazelcast.spi.properties.HazelcastProperties) TcpServerConnectionChannelErrorHandler(com.hazelcast.internal.server.tcp.TcpServerConnectionChannelErrorHandler) LoggingServiceImpl(com.hazelcast.logging.impl.LoggingServiceImpl) ILogger(com.hazelcast.logging.ILogger) NioNetworking(com.hazelcast.internal.networking.nio.NioNetworking) TcpServerConnectionChannelErrorHandler(com.hazelcast.internal.server.tcp.TcpServerConnectionChannelErrorHandler) ChannelErrorHandler(com.hazelcast.internal.networking.ChannelErrorHandler)

Aggregations

ChannelErrorHandler (com.hazelcast.internal.networking.ChannelErrorHandler)1 NioNetworking (com.hazelcast.internal.networking.nio.NioNetworking)1 TcpServerConnectionChannelErrorHandler (com.hazelcast.internal.server.tcp.TcpServerConnectionChannelErrorHandler)1 TcpServerContext (com.hazelcast.internal.server.tcp.TcpServerContext)1 ILogger (com.hazelcast.logging.ILogger)1 LoggingServiceImpl (com.hazelcast.logging.impl.LoggingServiceImpl)1 HazelcastProperties (com.hazelcast.spi.properties.HazelcastProperties)1