Module org.elasticsearch.server
Class BaseNodeResponse
java.lang.Object
org.elasticsearch.transport.TransportMessage
org.elasticsearch.transport.TransportResponse
org.elasticsearch.action.support.nodes.BaseNodeResponse
- All Implemented Interfaces:
Writeable,RefCounted
- Direct Known Subclasses:
ClusterStatsNodeResponse,HealthApiStatsAction.Response.Node,IndexModeStatsActionType.NodeResponse,NodeCapability,NodeFeatures,NodeFindDanglingIndexResponse,NodeHotThreads,NodeInfo,NodeListDanglingIndicesResponse,NodePrevalidateShardPathResponse,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.EmptyNested 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
ConstructorsModifierConstructorDescriptionprotectedprotectedRead a response from the given stream, with noDiscoveryNodeobject re-use.protectedBaseNodeResponse(StreamInput in, DiscoveryNode node) Read a response from the given stream, re-using the givenDiscoveryNodeobject if non-null. -
Method Summary
Modifier and TypeMethodDescriptiongetNode()The node this information relates to.voidwriteTo(StreamOutput out) Write this into the StreamOutput.Methods inherited from class org.elasticsearch.transport.TransportMessage
decRef, hasReferences, incRef, remoteAddress, remoteAddress, tryIncRefMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.elasticsearch.core.RefCounted
mustIncRef
-
Constructor Details
-
BaseNodeResponse
Read a response from the given stream, re-using the givenDiscoveryNodeobject if non-null. On the wire aBaseNodeResponsemessage starts with aDiscoveryNodeidentifying 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, sinceDiscoveryNodeobjects 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, ornullif not known.- Throws:
IOException
-
BaseNodeResponse
Read a response from the given stream, with noDiscoveryNodeobject 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:WriteableWrite this into the StreamOutput.- Throws:
IOException
-