public class Netty4Transport extends TcpTransport<io.netty.channel.Channel>
| Modifier and Type | Class and Description |
|---|---|
protected class |
Netty4Transport.ClientChannelInitializer |
protected class |
Netty4Transport.ServerChannelInitializer |
TcpTransport.HttpOnTransportException, TcpTransport.NodeChannels, TcpTransport.ProfileSettings, TcpTransport.ScheduledPingTransport.Connection| Modifier and Type | Field and Description |
|---|---|
protected io.netty.bootstrap.Bootstrap |
bootstrap |
static Setting<java.lang.Integer> |
NETTY_BOSS_COUNT |
static Setting<ByteSizeValue> |
NETTY_RECEIVE_PREDICTOR_MAX |
static Setting<ByteSizeValue> |
NETTY_RECEIVE_PREDICTOR_MIN |
static Setting<ByteSizeValue> |
NETTY_RECEIVE_PREDICTOR_SIZE |
protected ByteSizeValue |
receivePredictorMax |
protected ByteSizeValue |
receivePredictorMin |
protected io.netty.channel.RecvByteBufAllocator |
recvByteBufAllocator |
protected java.util.Map<java.lang.String,io.netty.bootstrap.ServerBootstrap> |
serverBootstraps |
static Setting<java.lang.Integer> |
WORKER_COUNT |
protected int |
workerCount |
BIND_HOST, BIND_HOST_PROFILE, boundAddress, closeLock, compress, connectedNodes, connectionLock, CONNECTIONS_PER_NODE_BULK, CONNECTIONS_PER_NODE_PING, CONNECTIONS_PER_NODE_RECOVERY, CONNECTIONS_PER_NODE_REG, CONNECTIONS_PER_NODE_STATE, DEFAULT_PROFILE, defaultConnectionProfile, HOST, networkService, PING_SCHEDULE, PORT, PORT_PROFILE, profileBoundAddresses, profileSettings, PUBLISH_HOST, PUBLISH_HOST_PROFILE, PUBLISH_PORT, PUBLISH_PORT_PROFILE, scheduledPing, serverChannels, TCP_CONNECT_TIMEOUT, TCP_KEEP_ALIVE, TCP_KEEP_ALIVE_PROFILE, TCP_NO_DELAY, TCP_NO_DELAY_PROFILE, TCP_RECEIVE_BUFFER_SIZE, TCP_RECEIVE_BUFFER_SIZE_PROFILE, TCP_REUSE_ADDRESS, TCP_REUSE_ADDRESS_PROFILE, TCP_SEND_BUFFER_SIZE, TCP_SEND_BUFFER_SIZE_PROFILE, threadPool, TRANSPORT_CLIENT_BOSS_THREAD_NAME_PREFIX, TRANSPORT_SERVER_WORKER_THREAD_NAME_PREFIX, transportServiceAdapterlifecycledeprecationLogger, logger, settingsTRANSPORT_TCP_COMPRESS| Constructor and Description |
|---|
Netty4Transport(Settings settings,
ThreadPool threadPool,
NetworkService networkService,
BigArrays bigArrays,
NamedWriteableRegistry namedWriteableRegistry,
CircuitBreakerService circuitBreakerService) |
| Modifier and Type | Method and Description |
|---|---|
protected io.netty.channel.Channel |
bind(java.lang.String name,
java.net.InetSocketAddress address) |
protected void |
closeChannels(java.util.List<io.netty.channel.Channel> channels,
boolean blocking) |
protected TcpTransport.NodeChannels |
connectToChannels(DiscoveryNode node,
ConnectionProfile profile,
java.util.function.Consumer<io.netty.channel.Channel> onChannelClose) |
protected void |
doStart() |
protected void |
exceptionCaught(io.netty.channel.ChannelHandlerContext ctx,
java.lang.Throwable cause) |
protected io.netty.channel.ChannelHandler |
getClientChannelInitializer() |
protected java.net.InetSocketAddress |
getLocalAddress(io.netty.channel.Channel channel) |
long |
getNumOpenServerConnections() |
protected io.netty.channel.ChannelHandler |
getServerChannelInitializer(java.lang.String name) |
protected boolean |
isOpen(io.netty.channel.Channel channel) |
protected void |
sendMessage(io.netty.channel.Channel channel,
BytesReference reference,
ActionListener<io.netty.channel.Channel> listener) |
protected void |
stopInternal() |
addressesFromString, bindServer, bindToPort, boundAddress, canCompress, closeChannelWhileHandlingExceptions, connectToNode, disconnectFromNode, doClose, doStop, ensureOpen, executeHandshake, getConnection, getCurrentVersion, getInFlightRequestBreaker, getLocalAddresses, getProfileSettings, getStats, handleRequest, messageReceived, newRequestId, nodeConnected, onException, openConnection, profileBoundAddresses, resolvePublishPort, sendErrorResponse, sendResponse, transportServiceAdapter, validateMessageHeader, validateRequestaddLifecycleListener, close, lifecycleState, removeLifecycleListener, start, stoplogDeprecatedSetting, logRemovedSetting, nodeNameclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddLifecycleListener, lifecycleState, removeLifecycleListener, start, stopclosepublic static final Setting<java.lang.Integer> WORKER_COUNT
public static final Setting<ByteSizeValue> NETTY_RECEIVE_PREDICTOR_SIZE
public static final Setting<ByteSizeValue> NETTY_RECEIVE_PREDICTOR_MIN
public static final Setting<ByteSizeValue> NETTY_RECEIVE_PREDICTOR_MAX
public static final Setting<java.lang.Integer> NETTY_BOSS_COUNT
protected final io.netty.channel.RecvByteBufAllocator recvByteBufAllocator
protected final int workerCount
protected final ByteSizeValue receivePredictorMin
protected final ByteSizeValue receivePredictorMax
protected volatile io.netty.bootstrap.Bootstrap bootstrap
protected final java.util.Map<java.lang.String,io.netty.bootstrap.ServerBootstrap> serverBootstraps
public Netty4Transport(Settings settings, ThreadPool threadPool, NetworkService networkService, BigArrays bigArrays, NamedWriteableRegistry namedWriteableRegistry, CircuitBreakerService circuitBreakerService)
protected void doStart()
doStart in class TcpTransport<io.netty.channel.Channel>protected io.netty.channel.ChannelHandler getServerChannelInitializer(java.lang.String name)
protected io.netty.channel.ChannelHandler getClientChannelInitializer()
protected final void exceptionCaught(io.netty.channel.ChannelHandlerContext ctx,
java.lang.Throwable cause)
throws java.lang.Exception
java.lang.Exceptionpublic long getNumOpenServerConnections()
getNumOpenServerConnections in class TcpTransport<io.netty.channel.Channel>protected TcpTransport.NodeChannels connectToChannels(DiscoveryNode node, ConnectionProfile profile, java.util.function.Consumer<io.netty.channel.Channel> onChannelClose)
connectToChannels in class TcpTransport<io.netty.channel.Channel>protected void sendMessage(io.netty.channel.Channel channel,
BytesReference reference,
ActionListener<io.netty.channel.Channel> listener)
sendMessage in class TcpTransport<io.netty.channel.Channel>protected void closeChannels(java.util.List<io.netty.channel.Channel> channels,
boolean blocking)
throws java.io.IOException
closeChannels in class TcpTransport<io.netty.channel.Channel>java.io.IOExceptionprotected java.net.InetSocketAddress getLocalAddress(io.netty.channel.Channel channel)
getLocalAddress in class TcpTransport<io.netty.channel.Channel>protected io.netty.channel.Channel bind(java.lang.String name,
java.net.InetSocketAddress address)
bind in class TcpTransport<io.netty.channel.Channel>protected boolean isOpen(io.netty.channel.Channel channel)
isOpen in class TcpTransport<io.netty.channel.Channel>protected void stopInternal()
stopInternal in class TcpTransport<io.netty.channel.Channel>