Package org.elasticsearch.transport
Class TcpTransport.NodeChannels
- java.lang.Object
-
- org.elasticsearch.transport.CloseableConnection
-
- org.elasticsearch.transport.TcpTransport.NodeChannels
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,Transport.Connection
- Enclosing class:
- TcpTransport
public final class TcpTransport.NodeChannels extends CloseableConnection
-
-
Method Summary
Modifier and Type Method Description TcpChannelchannel(TransportRequestOptions.Type type)voidclose()java.util.List<TcpChannel>getChannels()DiscoveryNodegetNode()The node this connection is associated withVersiongetVersion()Returns the version of the node this connection was established with.voidsendRequest(long requestId, java.lang.String action, TransportRequest request, TransportRequestOptions options)Sends the request to the node this connection is associated with-
Methods inherited from class org.elasticsearch.transport.CloseableConnection
addCloseListener, isClosed
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.elasticsearch.transport.Transport.Connection
getCacheKey
-
-
-
-
Method Detail
-
getVersion
public Version getVersion()
Description copied from interface:Transport.ConnectionReturns the version of the node this connection was established with.
-
getChannels
public java.util.List<TcpChannel> getChannels()
-
channel
public TcpChannel channel(TransportRequestOptions.Type type)
-
close
public void close()
- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Specified by:
closein interfaceTransport.Connection- Overrides:
closein classCloseableConnection
-
getNode
public DiscoveryNode getNode()
Description copied from interface:Transport.ConnectionThe node this connection is associated with
-
sendRequest
public void sendRequest(long requestId, java.lang.String action, TransportRequest request, TransportRequestOptions options) throws java.io.IOException, TransportExceptionDescription copied from interface:Transport.ConnectionSends the request to the node this connection is associated with- Parameters:
requestId- seeTransport.ResponseHandlers.add(ResponseContext)for detailsaction- the action to executerequest- the request to sendoptions- request options to apply- Throws:
NodeNotConnectedException- if the given node is not connectedjava.io.IOExceptionTransportException
-
-