public class NettyTransport extends AbstractLifecycleComponent<Transport > implements Transport
| Modifier and Type | Class and Description |
|---|---|
protected class |
NettyTransport
|
protected static class |
NettyTransport
|
static class |
NettyTransport
|
protected static class |
NettyTransport
|
Transport.TransportSettings lifecyclecomponentSettings, logger, settings| Constructor and Description |
|---|
NettyTransport(Settings
|
| Modifier and Type | Method and Description |
|---|---|
TransportAddress |
addressesFromString(String
Returns an address from its string representation.
|
boolean |
addressSupported(Class
Is the address type supported.
|
BoundTransportAddress |
boundAddress()
The address the transport is bound on.
|
ChannelPipelineFactory |
configureClientChannelPipelineFactory()
|
ChannelPipelineFactory |
configureServerChannelPipelineFactory(String
|
protected void |
connectToChannels(NettyTransport
|
protected NettyTransport |
connectToChannelsLight(DiscoveryNode
|
void |
connectToNode(DiscoveryNode
Connects to the given node, if already connected, does nothing.
|
void |
connectToNode(DiscoveryNode
|
void |
connectToNodeLight(DiscoveryNode
Connects to a node in a light manner.
|
void |
disconnectFromNode(DiscoveryNode
Disconnected from the given node, if not connected, will do nothing.
|
protected boolean |
disconnectFromNode(DiscoveryNode
Disconnects from a node, only if the relevant channel is found to be part of the node channels.
|
protected void |
disconnectFromNodeChannel(Channel channel, Throwable
Disconnects from a node if a channel is found as part of that nodes channels.
|
protected void |
doClose()
|
protected void |
doStart()
|
protected void |
doStop()
|
protected void |
exceptionCaught(ChannelHandlerContext ctx, ExceptionEvent e)
|
protected Channel |
nodeChannel(DiscoveryNode
|
boolean |
nodeConnected(DiscoveryNode
Returns
true if the node is connected.
|
Map |
profileBoundAddresses()
Further profile bound addresses
|
void |
sendRequest(DiscoveryNode
Sends the request to the node.
|
long |
serverOpen()
Returns count of currently open connections
|
Settings |
settings()
|
void |
transportServiceAdapter(TransportServiceAdapter
|
addLifecycleListener, close, lifecycleState, removeLifecycleListener, start, stopnodeNameclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddLifecycleListener, lifecycleState, removeLifecycleListener, start, stopclosepublic static final StringHTTP_SERVER_WORKER_THREAD_NAME_PREFIX
public static final StringHTTP_SERVER_BOSS_THREAD_NAME_PREFIX
public static final StringTRANSPORT_CLIENT_WORKER_THREAD_NAME_PREFIX
public static final StringTRANSPORT_CLIENT_BOSS_THREAD_NAME_PREFIX
public static final StringWORKER_COUNT
public static final StringCONNECTIONS_PER_NODE_RECOVERY
public static final StringCONNECTIONS_PER_NODE_BULK
public static final StringCONNECTIONS_PER_NODE_REG
public static final StringCONNECTIONS_PER_NODE_STATE
public static final StringCONNECTIONS_PER_NODE_PING
public static final StringPING_SCHEDULE
public static final TimeValueDEFAULT_PING_SCHEDULE
public static final StringDEFAULT_PORT_RANGE
public static final StringDEFAULT_PROFILE
protected final NetworkServicenetworkService
protected final Versionversion
protected final boolean blockingClient
protected final TimeValueconnectTimeout
protected final ByteSizeValuemaxCumulationBufferCapacity
protected final int maxCompositeBufferComponents
protected final boolean compress
protected final ReceiveBufferSizePredictorFactory receiveBufferSizePredictorFactory
protected final int workerCount
protected final ByteSizeValuereceivePredictorMin
protected final ByteSizeValuereceivePredictorMax
protected final int connectionsPerNodeRecovery
protected final int connectionsPerNodeBulk
protected final int connectionsPerNodeReg
protected final int connectionsPerNodeState
protected final int connectionsPerNodePing
protected final BigArraysbigArrays
protected final ThreadPoolthreadPool
protected volatile OpenChannelsHandlerserverOpenChannels
protected volatile ClientBootstrap clientBootstrap
protected final ConcurrentMap<DiscoveryNode ,NettyTransport .NodeChannels > connectedNodes
protected final Map<String ,BoundTransportAddress > profileBoundAddresses
protected volatile TransportServiceAdaptertransportServiceAdapter
protected volatile BoundTransportAddressboundAddress
@Inject public NettyTransport(Settingssettings, ThreadPool threadPool, NetworkService networkService, BigArrays bigArrays, Version version)
public Settingssettings()
public void transportServiceAdapter(TransportServiceAdapterservice)
protected void doStart()
throws ElasticsearchException
doStart in class
AbstractLifecycleComponent<Transport>
ElasticsearchException
public Map<String ,BoundTransportAddress > profileBoundAddresses()
Transport
profileBoundAddresses in interface
Transport
protected void doStop()
throws ElasticsearchException
doStop in class
AbstractLifecycleComponent<Transport>
ElasticsearchException
protected void doClose()
throws ElasticsearchException
doClose in class
AbstractLifecycleComponent<Transport>
ElasticsearchException
public TransportAddress[] addressesFromString(String address) throws Exception
Transport
addressesFromString in interface
Transport
Exception
public boolean addressSupported(Class<? extends TransportAddress > address)
Transport
public BoundTransportAddressboundAddress()
Transport
protected void exceptionCaught(ChannelHandlerContext ctx,
ExceptionEvent e)
throws Exception
Exception
public long serverOpen()
Transport
public void sendRequest(DiscoveryNodenode, long requestId, String action, TransportRequest request, TransportRequestOptions options) throws IOException , TransportException
Transport
sendRequest in interface
Transport
IOException
TransportException
public boolean nodeConnected(DiscoveryNodenode)
Transport
public void connectToNodeLight(DiscoveryNodenode) throws ConnectTransportException
Transport
connectToNodeLight in interface
Transport
ConnectTransportException
public void connectToNode(DiscoveryNodenode)
Transport
public void connectToNode(DiscoveryNodenode, boolean light)
protected NettyTransport.NodeChannels connectToChannelsLight(DiscoveryNode node)
protected void connectToChannels(NettyTransport.NodeChannels nodeChannels, DiscoveryNode node)
public void disconnectFromNode(DiscoveryNodenode)
Transport
protected boolean disconnectFromNode(DiscoveryNodenode, Channel channel, String reason)
protected void disconnectFromNodeChannel(Channel channel,
Throwable failure)
protected Channel nodeChannel(DiscoveryNodenode, TransportRequestOptions options) throws ConnectTransportException
ConnectTransportException
public ChannelPipelineFactory configureClientChannelPipelineFactory()