use of com.hazelcast.internal.networking.Networking in project hazelcast by hazelcast.
the class DefaultNodeContext method createServer.
@Override
public Server createServer(Node node, ServerSocketRegistry registry, LocalAddressRegistry addressRegistry) {
TcpServerContext context = new TcpServerContext(node, node.nodeEngine);
Networking networking = createNetworking(node);
Config config = node.getConfig();
MetricsRegistry metricsRegistry = node.nodeEngine.getMetricsRegistry();
return new TcpServer(config, context, registry, addressRegistry, metricsRegistry, networking, node.getNodeExtension().createChannelInitializerFn(context));
}
use of com.hazelcast.internal.networking.Networking in project hazelcast by hazelcast.
the class TcpServerConnectionManager method newChannel.
Channel newChannel(SocketChannel socketChannel, boolean clientMode) throws IOException {
Networking networking = server.getNetworking();
ChannelInitializer channelInitializer = channelInitializerFn.apply(endpointQualifier);
assert channelInitializer != null : "Found NULL channel initializer for endpoint-qualifier " + endpointQualifier;
Channel channel = networking.register(channelInitializer, socketChannel, clientMode);
// Advanced Network
if (endpointConfig != null) {
setChannelOptions(channel, endpointConfig);
}
acceptedChannels.add(channel);
return channel;
}
Aggregations