Class NodesStatsRequest

All Implemented Interfaces:
Writeable, org.elasticsearch.core.RefCounted, TaskAwareRequest

public class NodesStatsRequest extends BaseNodesRequest<NodesStatsRequest>
A request to get node (cluster) level stats.
  • Constructor Details

    • NodesStatsRequest

      public NodesStatsRequest()
    • NodesStatsRequest

      public NodesStatsRequest(StreamInput in) throws
      Throws:
    • NodesStatsRequest

      public NodesStatsRequest(... nodesIds)
      Get stats from nodes based on the nodes ids specified. If none are passed, stats for all nodes will be returned.
  • Method Details

    • all

      public NodesStatsRequest all()
      Sets all the request flags.
    • clear

      public NodesStatsRequest clear()
      Clears all the request flags.
    • indices

      public CommonStatsFlags indices()
      Get indices. Handles separately from other metrics because it may or may not have submetrics.
      Returns:
      flags indicating which indices stats to return
    • indices

      public NodesStatsRequest indices(CommonStatsFlags indices)
      Set indices. Handles separately from other metrics because it may or may not involve submetrics.
      Parameters:
      indices - flags indicating which indices stats to return
      Returns:
      This object, for request chaining.
    • indices

      public NodesStatsRequest indices(boolean indices)
      Should indices stats be returned.
    • requestedMetrics

      public <> requestedMetrics()
      Get the names of requested metrics, excluding indices, which are handled separately.
    • addMetric

      public  metric)
      Add metric
    • addMetrics

      public ... metrics)
      Add an array of metric names
    • removeMetric

      public  metric)
      Remove metric
    • createTask

      public Task createTask(long id,  type,  action, TaskId parentTaskId, <,​> headers)
      Description copied from interface: TaskAwareRequest
      Returns the task object that should be used to keep track of the processing of the request.
    • writeTo

      public void writeTo(StreamOutput out) throws
      Description copied from interface: Writeable
      Write this into the StreamOutput.
      Specified by:
      writeTo in interface Writeable
      Overrides:
      writeTo in class BaseNodesRequest<NodesStatsRequest>
      Throws: