Search in sources :

Example 1 with TcpServerConnectionChannelErrorHandler

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()));
}
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)

Example 2 with TcpServerConnectionChannelErrorHandler

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));
}
Also used : HazelcastProperties(com.hazelcast.spi.properties.HazelcastProperties) TcpServerConnectionChannelErrorHandler(com.hazelcast.internal.server.tcp.TcpServerConnectionChannelErrorHandler) LoggingService(com.hazelcast.logging.LoggingService)

Example 3 with TcpServerConnectionChannelErrorHandler

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));
}
Also used : HazelcastProperties(com.hazelcast.spi.properties.HazelcastProperties) TcpServerConnectionChannelErrorHandler(com.hazelcast.internal.server.tcp.TcpServerConnectionChannelErrorHandler) LoggingService(com.hazelcast.logging.LoggingService)

Example 4 with TcpServerConnectionChannelErrorHandler

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));
}
Also used : MockServerContext(com.hazelcast.internal.server.MockServerContext) HazelcastProperties(com.hazelcast.spi.properties.HazelcastProperties) TcpServerConnectionChannelErrorHandler(com.hazelcast.internal.server.tcp.TcpServerConnectionChannelErrorHandler) LoggingService(com.hazelcast.logging.LoggingService)

Aggregations

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