Package org.elasticsearch.transport.nio
Class NioTransport
java.lang.Object
org.elasticsearch.common.component.AbstractLifecycleComponent
org.elasticsearch.transport.TcpTransport
org.elasticsearch.transport.nio.NioTransport
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,LifecycleComponent,Releasable,Transport
public class NioTransport extends TcpTransport
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected classNioTransport.TcpChannelFactoryNested 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.ResponseContext<T extends TransportResponse>, Transport.ResponseHandlers -
Field Summary
Fields Modifier and Type Field Description protected PageAllocatorpageAllocatorFields inherited from class org.elasticsearch.transport.TcpTransport
networkService, pageCacheRecycler, profileSettings, settings, threadPool, TRANSPORT_WORKER_THREAD_NAME_PREFIX -
Constructor Summary
Constructors Modifier Constructor Description protectedNioTransport(Settings settings, Version version, ThreadPool threadPool, NetworkService networkService, PageCacheRecycler pageCacheRecycler, NamedWriteableRegistry namedWriteableRegistry, CircuitBreakerService circuitBreakerService, NioGroupFactory groupFactory) -
Method Summary
Modifier and Type Method Description protected voidacceptChannel(NioSocketChannel channel)protected NioTcpServerChannelbind(java.lang.String name, java.net.InetSocketAddress address)protected java.util.function.Function<DiscoveryNode,NioTransport.TcpChannelFactory>clientChannelFactoryFunction(TcpTransport.ProfileSettings profileSettings)protected voiddoStart()protected NioTcpChannelinitiateChannel(DiscoveryNode node)protected NioTransport.TcpChannelFactoryserverChannelFactory(TcpTransport.ProfileSettings profileSettings)protected voidstopInternal()Methods inherited from class org.elasticsearch.transport.TcpTransport
addressesFromString, bindServer, boundAddress, consumeNetworkReads, doClose, doStop, executeHandshake, getDefaultSeedAddresses, getProfileSettings, getRequestHandler, getResponseHandlers, getStats, inboundMessage, maybeOverrideConnectionProfile, onException, onServerException, openConnection, profileBoundAddresses, readMessageLength, registerRequestHandler, serverAcceptedChannel, setMessageListenerMethods 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, stop
-
Field Details
-
Constructor Details
-
NioTransport
protected NioTransport(Settings settings, Version version, ThreadPool threadPool, NetworkService networkService, PageCacheRecycler pageCacheRecycler, NamedWriteableRegistry namedWriteableRegistry, CircuitBreakerService circuitBreakerService, NioGroupFactory groupFactory)
-
-
Method Details
-
bind
protected NioTcpServerChannel bind(java.lang.String name, java.net.InetSocketAddress address) throws java.io.IOException- Specified by:
bindin classTcpTransport- Throws:
java.io.IOException
-
initiateChannel
- Specified by:
initiateChannelin classTcpTransport- Throws:
java.io.IOException
-
doStart
protected void doStart()- Overrides:
doStartin classTcpTransport
-
stopInternal
protected void stopInternal()- Specified by:
stopInternalin classTcpTransport
-
acceptChannel
-
serverChannelFactory
protected NioTransport.TcpChannelFactory serverChannelFactory(TcpTransport.ProfileSettings profileSettings) -
clientChannelFactoryFunction
protected java.util.function.Function<DiscoveryNode,NioTransport.TcpChannelFactory> clientChannelFactoryFunction(TcpTransport.ProfileSettings profileSettings)
-