All Implemented Interfaces:
Writeable, ToXContent, ToXContentFragment

public class NodeUsage
extends BaseNodeResponse
implements ToXContentFragment
  • Constructor Details

    • NodeUsage

      public NodeUsage​(StreamInput in) throws java.io.IOException
      Throws:
      java.io.IOException
    • NodeUsage

      public NodeUsage​(DiscoveryNode node, long timestamp, long sinceTime, java.util.Map<java.lang.String,​java.lang.Long> restUsage, java.util.Map<java.lang.String,​java.lang.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 java.util.Map<java.lang.String,​java.lang.Long> getRestUsage()
      Returns:
      a map containing the counts of the number of times each REST endpoint has been called
    • getAggregationUsage

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

      public XContentBuilder toXContent​(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
      Specified by:
      toXContent in interface ToXContent
      Throws:
      java.io.IOException
    • 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 BaseNodeResponse
      Throws:
      java.io.IOException