Class Netty4Transport
java.lang.Object
org.elasticsearch.common.component.AbstractLifecycleComponent
org.elasticsearch.transport.TcpTransport
org.elasticsearch.transport.netty4.Netty4Transport
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,LifecycleComponent,Releasable,Transport
public class Netty4Transport extends TcpTransport
There are 4 types of connections per node, low/med/high/ping. Low if for batch oriented APIs (like recovery or
batch) with high payload that will cause regular request. (like search or single index) to take
longer. Med is for the typical search / single doc index. And High for things like cluster state. Ping is reserved for
sending out ping requests to other nodes.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected classNetty4Transport.ClientChannelInitializerprotected classNetty4Transport.ServerChannelInitializerNested classes/interfaces inherited from class org.elasticsearch.transport.TcpTransport
TcpTransport.HttpRequestOnTransportException, TcpTransport.NodeChannels, TcpTransport.ProfileSettingsNested classes/interfaces inherited from interface org.elasticsearch.transport.Transport
Transport.Connection, Transport.RequestHandlers, Transport.ResponseContext<T extends TransportResponse>, Transport.ResponseHandlers -
Field Summary
Fields Modifier and Type Field Description static Setting<java.lang.Integer>NETTY_BOSS_COUNTstatic Setting<ByteSizeValue>NETTY_RECEIVE_PREDICTOR_MAXstatic Setting<ByteSizeValue>NETTY_RECEIVE_PREDICTOR_MINstatic Setting<ByteSizeValue>NETTY_RECEIVE_PREDICTOR_SIZEstatic Setting<java.lang.Integer>WORKER_COUNTFields inherited from class org.elasticsearch.transport.TcpTransport
networkService, pageCacheRecycler, profileSettings, settings, threadPool, TRANSPORT_WORKER_THREAD_NAME_PREFIX -
Constructor Summary
Constructors Constructor Description Netty4Transport(Settings settings, Version version, ThreadPool threadPool, NetworkService networkService, PageCacheRecycler pageCacheRecycler, NamedWriteableRegistry namedWriteableRegistry, CircuitBreakerService circuitBreakerService, SharedGroupFactory sharedGroupFactory) -
Method Summary
Modifier and Type Method Description protected Netty4TcpServerChannelbind(java.lang.String name, java.net.InetSocketAddress address)protected voiddoStart()protected io.netty.channel.ChannelHandlergetClientChannelInitializer(DiscoveryNode node)protected io.netty.channel.ChannelHandlergetServerChannelInitializer(java.lang.String name)protected Netty4TcpChannelinitiateChannel(DiscoveryNode node)protected voidstopInternal()Methods inherited from class org.elasticsearch.transport.TcpTransport
addressesFromString, bindServer, boundAddress, doClose, doStop, executeHandshake, getDefaultSeedAddresses, getInflightBreaker, getProfileSettings, getRequestHandlers, getResponseHandlers, getStats, getStatsTracker, getThreadPool, getVersion, inboundMessage, maybeOverrideConnectionProfile, onException, onServerException, openConnection, profileBoundAddresses, readMessageLength, serverAcceptedChannel, setMessageListener, setSlowLogThresholdMethods inherited from class org.elasticsearch.common.component.AbstractLifecycleComponent
addLifecycleListener, close, lifecycleState, removeLifecycleListener, start, stopMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.elasticsearch.common.component.LifecycleComponent
addLifecycleListener, lifecycleState, removeLifecycleListener, start, stopMethods inherited from interface org.elasticsearch.transport.Transport
isSecure, registerRequestHandler
-
Field Details
-
Constructor Details
-
Netty4Transport
public Netty4Transport(Settings settings, Version version, ThreadPool threadPool, NetworkService networkService, PageCacheRecycler pageCacheRecycler, NamedWriteableRegistry namedWriteableRegistry, CircuitBreakerService circuitBreakerService, SharedGroupFactory sharedGroupFactory)
-
-
Method Details
-
doStart
protected void doStart()- Overrides:
doStartin classTcpTransport
-
getServerChannelInitializer
protected io.netty.channel.ChannelHandler getServerChannelInitializer(java.lang.String name) -
getClientChannelInitializer
-
initiateChannel
- Specified by:
initiateChannelin classTcpTransport- Throws:
java.io.IOException
-
bind
- Specified by:
bindin classTcpTransport
-
stopInternal
protected void stopInternal()- Specified by:
stopInternalin classTcpTransport
-