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

public class NodeUsage extends BaseNodeResponse implements org.elasticsearch.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.xcontent.XContentBuilder toXContent(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) throws IOException
      Specified by:
      toXContent in interface org.elasticsearch.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