Class BaseNodeResponse
java.lang.Object
org.elasticsearch.transport.TransportMessage
org.elasticsearch.transport.TransportResponse
org.elasticsearch.action.support.nodes.BaseNodeResponse
- All Implemented Interfaces:
Writeable
,org.elasticsearch.core.RefCounted
- Direct Known Subclasses:
ClusterStatsNodeResponse
,NodeFindDanglingIndexResponse
,NodeHotThreads
,NodeInfo
,NodeListDanglingIndicesResponse
,NodesReloadSecureSettingsResponse.NodeResponse
,NodeStats
,NodeUsage
,TransportNodesListGatewayStartedShards.NodeGatewayStartedShards
,TransportNodesListShardStoreMetadata.NodeStoreFilesMetadata
,TransportNodesSnapshotsStatus.NodeSnapshotStatus
A base class for node level operations.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.elasticsearch.transport.TransportResponse
TransportResponse.Empty
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V>
-
Constructor Summary
ModifierConstructorDescriptionprotected
protected
Read a response from the given stream, with noDiscoveryNode
object re-use.protected
BaseNodeResponse
(StreamInput in, DiscoveryNode node) Read a response from the given stream, re-using the givenDiscoveryNode
object if non-null. -
Method Summary
Modifier and TypeMethodDescriptiongetNode()
The node this information relates to.void
writeTo
(StreamOutput out) Write this into the StreamOutput.Methods inherited from class org.elasticsearch.transport.TransportMessage
decRef, hasReferences, incRef, remoteAddress, remoteAddress, tryIncRef
-
Constructor Details
-
BaseNodeResponse
Read a response from the given stream, re-using the givenDiscoveryNode
object if non-null. On the wire aBaseNodeResponse
message starts with aDiscoveryNode
identifying the original responder. If the sender knows the identity of the responder already then we prefer to use that rather than reading the object from the wire, sinceDiscoveryNode
objects are sometimes quite large and yet they're immutable so there's no need to have multiple copies in memory.- Parameters:
node
- the expected remote node, ornull
if not known.- Throws:
IOException
-
BaseNodeResponse
Read a response from the given stream, with noDiscoveryNode
object re-use. Callers should not use this constructor if the local node is known, and instead should callBaseNodeResponse(StreamInput, DiscoveryNode)
.- Throws:
IOException
-
BaseNodeResponse
-
-
Method Details
-
getNode
The node this information relates to. -
writeTo
Description copied from interface:Writeable
Write this into the StreamOutput.- Throws:
IOException
-