public final class TcpTransport.NodeChannels extends java.lang.Object implements Transport.Connection
Constructor and Description |
---|
NodeChannels(DiscoveryNode node,
Channel[] channels,
ConnectionProfile connectionProfile) |
Modifier and Type | Method and Description |
---|---|
Channel |
channel(TransportRequestOptions.Type type) |
void |
close() |
java.util.List<Channel> |
getChannels() |
DiscoveryNode |
getNode()
The node this connection is associated with
|
Version |
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
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getCacheKey
public NodeChannels(DiscoveryNode node, Channel[] channels, ConnectionProfile connectionProfile)
public Version getVersion()
Transport.Connection
getVersion
in interface Transport.Connection
public java.util.List<Channel> getChannels()
public Channel channel(TransportRequestOptions.Type type)
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
java.io.IOException
public DiscoveryNode getNode()
Transport.Connection
getNode
in interface Transport.Connection
public void sendRequest(long requestId, java.lang.String action, TransportRequest request, TransportRequestOptions options) throws java.io.IOException, TransportException
Transport.Connection
sendRequest
in interface Transport.Connection
NodeNotConnectedException
- if the given node is not connectedjava.io.IOException
TransportException