Class Netty4Transport
java.lang.Object
org.elasticsearch.common.component.AbstractLifecycleComponent
org.elasticsearch.transport.TcpTransport
org.elasticsearch.transport.netty4.Netty4Transport
- All Implemented Interfaces:
Closeable,AutoCloseable,org.elasticsearch.common.component.LifecycleComponent,org.elasticsearch.core.Releasable,org.elasticsearch.transport.Transport
public class Netty4Transport
extends org.elasticsearch.transport.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 ClassesModifier and TypeClassDescriptionprotected classprotected classNested classes/interfaces inherited from class org.elasticsearch.transport.TcpTransport
org.elasticsearch.transport.TcpTransport.HttpRequestOnTransportException, org.elasticsearch.transport.TcpTransport.NodeChannels, org.elasticsearch.transport.TcpTransport.ProfileSettingsNested classes/interfaces inherited from interface org.elasticsearch.transport.Transport
org.elasticsearch.transport.Transport.Connection, org.elasticsearch.transport.Transport.RequestHandlers, org.elasticsearch.transport.Transport.ResponseContext<T extends org.elasticsearch.transport.TransportResponse>, org.elasticsearch.transport.Transport.ResponseHandlers -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic org.elasticsearch.common.settings.Setting<Integer>static org.elasticsearch.common.settings.Setting<org.elasticsearch.common.unit.ByteSizeValue>static org.elasticsearch.common.settings.Setting<org.elasticsearch.common.unit.ByteSizeValue>static org.elasticsearch.common.settings.Setting<org.elasticsearch.common.unit.ByteSizeValue>static org.elasticsearch.common.settings.Setting<Integer>Fields inherited from class org.elasticsearch.transport.TcpTransport
networkService, pageCacheRecycler, profileSettings, settings, threadPool, TRANSPORT_WORKER_THREAD_NAME_PREFIXFields inherited from class org.elasticsearch.common.component.AbstractLifecycleComponent
lifecycle -
Constructor Summary
ConstructorsConstructorDescriptionNetty4Transport(org.elasticsearch.common.settings.Settings settings, org.elasticsearch.Version version, org.elasticsearch.threadpool.ThreadPool threadPool, org.elasticsearch.common.network.NetworkService networkService, org.elasticsearch.common.util.PageCacheRecycler pageCacheRecycler, org.elasticsearch.common.io.stream.NamedWriteableRegistry namedWriteableRegistry, org.elasticsearch.indices.breaker.CircuitBreakerService circuitBreakerService, SharedGroupFactory sharedGroupFactory) -
Method Summary
Modifier and TypeMethodDescriptionprotected Netty4TcpServerChannelbind(String name, InetSocketAddress address)protected voiddoStart()protected io.netty.channel.ChannelHandlergetClientChannelInitializer(org.elasticsearch.cluster.node.DiscoveryNode node)protected io.netty.channel.ChannelHandlerprotected Netty4TcpChannelinitiateChannel(org.elasticsearch.cluster.node.DiscoveryNode node)protected voidMethods 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.core.Releasable
closeMethods inherited from interface org.elasticsearch.transport.Transport
isSecure, registerRequestHandler
-
Field Details
-
WORKER_COUNT
-
NETTY_RECEIVE_PREDICTOR_SIZE
public static final org.elasticsearch.common.settings.Setting<org.elasticsearch.common.unit.ByteSizeValue> NETTY_RECEIVE_PREDICTOR_SIZE -
NETTY_RECEIVE_PREDICTOR_MIN
public static final org.elasticsearch.common.settings.Setting<org.elasticsearch.common.unit.ByteSizeValue> NETTY_RECEIVE_PREDICTOR_MIN -
NETTY_RECEIVE_PREDICTOR_MAX
public static final org.elasticsearch.common.settings.Setting<org.elasticsearch.common.unit.ByteSizeValue> NETTY_RECEIVE_PREDICTOR_MAX -
NETTY_BOSS_COUNT
-
-
Constructor Details
-
Method Details
-
doStart
protected void doStart()- Overrides:
doStartin classorg.elasticsearch.transport.TcpTransport
-
getServerChannelInitializer
-
getClientChannelInitializer
protected io.netty.channel.ChannelHandler getClientChannelInitializer(org.elasticsearch.cluster.node.DiscoveryNode node) -
initiateChannel
protected Netty4TcpChannel initiateChannel(org.elasticsearch.cluster.node.DiscoveryNode node) throws IOException- Specified by:
initiateChannelin classorg.elasticsearch.transport.TcpTransport- Throws:
IOException
-
bind
- Specified by:
bindin classorg.elasticsearch.transport.TcpTransport
-
stopInternal
protected void stopInternal()- Specified by:
stopInternalin classorg.elasticsearch.transport.TcpTransport
-