java.lang.Object
org.elasticsearch.transport.TransportMessage
- All Implemented Interfaces:
Writeable
,RefCounted
- Direct Known Subclasses:
TransportRequest
,TransportResponse
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V>
-
Field Summary
Fields inherited from interface org.elasticsearch.core.RefCounted
ALWAYS_REFERENCED
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs a new empty transport messageConstructs a new transport message with the data from theStreamInput
. -
Method Summary
Modifier and TypeMethodDescriptionboolean
decRef()
Note that the lifetime of an outboundTransportMessage
lasts at least until it has been fully sent over the network, and it may be closed on a network thread in a context in which there's a risk of stack overflows if on close it calls back into the network layer in a manner that might end up nesting too deeply.boolean
void
incRef()
void
remoteAddress
(InetSocketAddress remoteAddress) boolean
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.elasticsearch.core.RefCounted
mustIncRef
-
Constructor Details
-
TransportMessage
public TransportMessage()Constructs a new empty transport message -
TransportMessage
Constructs a new transport message with the data from theStreamInput
. This is currently a no-op
-
-
Method Details
-
remoteAddress
-
remoteAddress
-
incRef
public void incRef()- Specified by:
incRef
in interfaceRefCounted
-
tryIncRef
public boolean tryIncRef()- Specified by:
tryIncRef
in interfaceRefCounted
-
decRef
public boolean decRef()Note that the lifetime of an outboundTransportMessage
lasts at least until it has been fully sent over the network, and it may be closed on a network thread in a context in which there's a risk of stack overflows if on close it calls back into the network layer in a manner that might end up nesting too deeply. When in doubt, dispatch any further work onto a separate thread.- Specified by:
decRef
in interfaceRefCounted
-
hasReferences
public boolean hasReferences()- Specified by:
hasReferences
in interfaceRefCounted
-