All Implemented Interfaces:
Writeable, org.elasticsearch.common.xcontent.ToXContent, org.elasticsearch.common.xcontent.ToXContentFragment, org.elasticsearch.core.RefCounted

public class NodeUsage extends BaseNodeResponse implements org.elasticsearch.common.xcontent.ToXContentFragment
  • Constructor Details

    • NodeUsage

      public NodeUsage(StreamInput in) throws IOException
      Throws:
      IOException
    • NodeUsage

      public NodeUsage(DiscoveryNode node, long timestamp, long sinceTime, Map<String,Long> restUsage, Map<String,Object> aggregationUsage)
      Parameters:
      node - the node these statistics were collected from
      timestamp - the timestamp for when these statistics were collected
      sinceTime - the timestamp for when the collection of these statistics started
      restUsage - a map containing the counts of the number of times each REST endpoint has been called
  • Method Details

    • getTimestamp

      public long getTimestamp()
      Returns:
      the timestamp for when these statistics were collected
    • getSinceTime

      public long getSinceTime()
      Returns:
      the timestamp for when the collection of these statistics started
    • getRestUsage

      public Map<String,Long> getRestUsage()
      Returns:
      a map containing the counts of the number of times each REST endpoint has been called
    • getAggregationUsage

      public Map<String,Object> getAggregationUsage()
      Returns:
      a map containing the counts of the number of times each REST endpoint has been called
    • toXContent

      public org.elasticsearch.common.xcontent.XContentBuilder toXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params) throws IOException
      Specified by:
      toXContent in interface org.elasticsearch.common.xcontent.ToXContent
      Throws:
      IOException
    • writeTo

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