Package org.elasticsearch.transport
Class TcpTransport.NodeChannels
- java.lang.Object
-
- 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 java.lang.Object implements Transport.Connection
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
allChannelsOpen()
TcpChannel
channel(TransportRequestOptions.Type type)
void
close()
java.util.List<TcpChannel>
getChannels()
DiscoveryNode
getNode()
The node this connection is associated withVersion
getVersion()
Returns the version of the node this connection was established with.void
sendRequest(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 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.Connection
Returns the version of the node this connection was established with.- Specified by:
getVersion
in interfaceTransport.Connection
-
getChannels
public java.util.List<TcpChannel> getChannels()
-
channel
public TcpChannel channel(TransportRequestOptions.Type type)
-
allChannelsOpen
public boolean allChannelsOpen()
-
close
public void close()
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
-
getNode
public DiscoveryNode getNode()
Description copied from interface:Transport.Connection
The node this connection is associated with- Specified by:
getNode
in interfaceTransport.Connection
-
sendRequest
public void sendRequest(long requestId, java.lang.String action, TransportRequest request, TransportRequestOptions options) throws java.io.IOException, TransportException
Description copied from interface:Transport.Connection
Sends the request to the node this connection is associated with- Specified by:
sendRequest
in interfaceTransport.Connection
- 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.IOException
TransportException
-
-