java.lang.Object
org.elasticsearch.core.AbstractRefCounted
org.elasticsearch.transport.CloseableConnection
org.elasticsearch.transport.TcpTransport.NodeChannels
- All Implemented Interfaces:
Closeable
,AutoCloseable
,RefCounted
,Transport.Connection
- Enclosing class:
- TcpTransport
-
Field Summary
Fields inherited from class org.elasticsearch.core.AbstractRefCounted
ALREADY_CLOSED_MESSAGE, INVALID_DECREF_MESSAGE
Fields inherited from interface org.elasticsearch.core.RefCounted
ALWAYS_REFERENCED
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
getNode()
The node this connection is associated withReturns the version of the data to communicate in this channel.void
sendRequest
(long requestId, String action, TransportRequest request, TransportRequestOptions options) Sends the request to the node this connection is associated withtoString()
Methods inherited from class org.elasticsearch.transport.CloseableConnection
addCloseListener, addRemovedListener, closeInternal, isClosed, onRemoved
Methods inherited from class org.elasticsearch.core.AbstractRefCounted
alreadyClosed, decRef, hasReferences, incRef, of, refCount, touch, tryIncRef
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.elasticsearch.core.RefCounted
decRef, hasReferences, incRef, mustIncRef, tryIncRef
Methods inherited from interface org.elasticsearch.transport.Transport.Connection
getCacheKey
-
Method Details
-
getTransportVersion
Description copied from interface:Transport.Connection
Returns the version of the data to communicate in this channel. -
getChannels
-
channel
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in interfaceTransport.Connection
- Overrides:
close
in classCloseableConnection
-
getNode
Description copied from interface:Transport.Connection
The node this connection is associated with -
sendRequest
public void sendRequest(long requestId, String action, TransportRequest request, TransportRequestOptions options) throws IOException, TransportException Description copied from interface:Transport.Connection
Sends the request to the node this connection is associated with- Parameters:
requestId
- seeTransport.ResponseHandlers.add(TransportResponseHandler, Connection, String)
for detailsaction
- the action to executerequest
- the request to sendoptions
- request options to apply- Throws:
NodeNotConnectedException
- if the given node is not connectedIOException
TransportException
-
toString
-