Module org.elasticsearch.server
Class BaseNodesResponse<TNodeResponse extends BaseNodeResponse>
java.lang.Object
org.elasticsearch.transport.TransportMessage
org.elasticsearch.transport.TransportResponse
org.elasticsearch.action.ActionResponse
org.elasticsearch.action.support.nodes.BaseNodesResponse<TNodeResponse>
- All Implemented Interfaces:
Writeable
,RefCounted
- Direct Known Subclasses:
BaseNodesXContentResponse
,ClusterStatsResponse
,FindDanglingIndexResponse
,HealthApiStatsAction.Response
,ListDanglingIndicesResponse
,NodesHotThreadsResponse
,NodesInfoResponse
,NodesReloadSecureSettingsResponse
,NodesUsageResponse
,PrevalidateShardPathResponse
,TransportNodesListGatewayStartedShards.NodesGatewayStartedShards
,TransportNodesListShardStoreMetadata.NodesStoreFilesMetadata
,TransportNodesSnapshotsStatus.NodesSnapshotStatus
public abstract class BaseNodesResponse<TNodeResponse extends BaseNodeResponse>
extends ActionResponse
-
Nested Class Summary
Nested classes/interfaces inherited from class org.elasticsearch.action.ActionResponse
ActionResponse.Empty
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
ModifierConstructorDescriptionprotected
BaseNodesResponse
(ClusterName clusterName, List<TNodeResponse> nodes, List<FailedNodeException> failures) protected
-
Method Summary
Modifier and TypeMethodDescriptionfailures()
Get the failed node exceptions.Get theClusterName
associated with all of the nodes.getNodes()
Get the successful node responses.Lazily build and get a map of Node ID to node response.boolean
Determine if there are any node failures infailures
.protected abstract List<TNodeResponse>
Read thenodes
from the stream.protected abstract void
writeNodesTo
(StreamOutput out, List<TNodeResponse> nodes) Write thenodes
to the stream.void
writeTo
(StreamOutput out) Write this into the StreamOutput.Methods inherited from class org.elasticsearch.transport.TransportMessage
decRef, hasReferences, incRef, remoteAddress, remoteAddress, tryIncRef
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
-
BaseNodesResponse
- Throws:
IOException
-
BaseNodesResponse
protected BaseNodesResponse(ClusterName clusterName, List<TNodeResponse> nodes, List<FailedNodeException> failures)
-
-
Method Details
-
getClusterName
Get theClusterName
associated with all of the nodes.- Returns:
- Never
null
.
-
failures
Get the failed node exceptions.- Returns:
- Never
null
. Can be empty.
-
hasFailures
public boolean hasFailures()Determine if there are any node failures infailures
.- Returns:
true
iffailures
contains at least 1FailedNodeException
.
-
getNodes
Get the successful node responses.- Returns:
- Never
null
. Can be empty. - See Also:
-
getNodesMap
Lazily build and get a map of Node ID to node response.- Returns:
- Never
null
. Can be empty. - See Also:
-
writeTo
Description copied from interface:Writeable
Write this into the StreamOutput.- Throws:
IOException
-
readNodesFrom
Read thenodes
from the stream.- Returns:
- Never
null
. - Throws:
IOException
-
writeNodesTo
protected abstract void writeNodesTo(StreamOutput out, List<TNodeResponse> nodes) throws IOException Write thenodes
to the stream.- Throws:
IOException
-