Class NodesStatsRequest

All Implemented Interfaces:
Writeable, org.elasticsearch.common.util.concurrent.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 java.io.IOException
      Throws:
      java.io.IOException
    • NodesStatsRequest

      public NodesStatsRequest​(java.lang.String... 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 java.util.Set<java.lang.String> requestedMetrics()
      Get the names of requested metrics, excluding indices, which are handled separately.
    • addMetric

      public NodesStatsRequest addMetric​(java.lang.String metric)
      Add metric
    • addMetrics

      public NodesStatsRequest addMetrics​(java.lang.String... metrics)
      Add an array of metric names
    • removeMetric

      public NodesStatsRequest removeMetric​(java.lang.String metric)
      Remove metric
    • writeTo

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