Class BaseNodesResponse<TNodeResponse extends BaseNodeResponse>

All Implemented Interfaces:
Writeable, org.elasticsearch.core.RefCounted
Direct Known Subclasses:
ClusterStatsResponse, FindDanglingIndexResponse, ListDanglingIndicesResponse, NodesHotThreadsResponse, NodesInfoResponse, NodesReloadSecureSettingsResponse, NodesStatsResponse, NodesUsageResponse, TransportNodesListGatewayMetaState.NodesGatewayMetaState, TransportNodesListGatewayStartedShards.NodesGatewayStartedShards, TransportNodesListShardStoreMetadata.NodesStoreFilesMetadata, TransportNodesSnapshotsStatus.NodesSnapshotStatus

public abstract class BaseNodesResponse<TNodeResponse extends BaseNodeResponse> extends ActionResponse
  • Constructor Details

  • Method Details

    • getClusterName

      public ClusterName getClusterName()
      Get the ClusterName associated with all of the nodes.
      Returns:
      Never null.
    • failures

      public <FailedNodeException> failures()
      Get the failed node exceptions.
      Returns:
      Never null. Can be empty.
    • hasFailures

      public boolean hasFailures()
      Determine if there are any node failures in failures.
      Returns:
      true if failures contains at least 1 FailedNodeException.
    • getNodes

      public <TNodeResponse> getNodes()
      Get the successful node responses.
      Returns:
      Never null. Can be empty.
      See Also:
      hasFailures()
    • getNodesMap

      public <,​TNodeResponse> getNodesMap()
      Lazily build and get a map of Node ID to node response.
      Returns:
      Never null. Can be empty.
      See Also:
      getNodes()
    • writeTo

      public void writeTo(StreamOutput out) throws
      Description copied from interface: Writeable
      Write this into the StreamOutput.
      Throws:
    • readNodesFrom

      protected abstract <TNodeResponse> readNodesFrom(StreamInput in) throws
      Read the nodes from the stream.
      Returns:
      Never null.
      Throws:
    • writeNodesTo

      protected abstract void writeNodesTo(StreamOutput out, <TNodeResponse> nodes) throws
      Write the nodes to the stream.
      Throws: