java.io.Closeable
, java.lang.AutoCloseable
, Transport.Connection
public final class TcpTransport.NodeChannels extends java.lang.Object implements Transport.Connection
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 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 Version getVersion()
Transport.Connection
getVersion
in interface Transport.Connection
public java.util.List<TcpChannel> getChannels()
public TcpChannel channel(TransportRequestOptions.Type type)
public boolean allChannelsOpen()
public void close()
close
in interface java.lang.AutoCloseable
close
in interface java.io.Closeable
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