Class QueryResult

java.lang.Object
org.jmxtrans.agent.QueryResult

public class QueryResult
extends java.lang.Object
Author:
Cyrille Le Clerc
  • Constructor Summary

    Constructors
    Constructor Description
    QueryResult​(java.lang.String name, java.lang.Object value, long epochInMillis)  
    QueryResult​(java.lang.String name, java.lang.String type, java.lang.Object value, long epochInMillis)  
  • Method Summary

    Modifier and Type Method Description
    boolean equals​(java.lang.Object o)  
    long getEpoch​(java.util.concurrent.TimeUnit timeUnit)  
    long getEpochInMillis()  
    java.lang.String getName()  
    java.lang.String getType()  
    java.lang.Object getValue()  
    int hashCode()  
    boolean isValueGreaterThan​(QueryResult o)  
    java.lang.String toString()  

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • QueryResult

      public QueryResult​(@Nonnull java.lang.String name, @Nullable java.lang.Object value, long epochInMillis)
      Parameters:
      name - plain name of the metric (variables (e.g. %my-jmx-attr%) must have been resolved).
      value - value of the collected metric
      epochInMillis - collect time in millis (see System.currentTimeMillis())
    • QueryResult

      public QueryResult​(@Nonnull java.lang.String name, @Nullable java.lang.String type, @Nullable java.lang.Object value, long epochInMillis)
      Parameters:
      name - plain name of the metric (variables (e.g. %my-jmx-attr%) must have been resolved).
      type - type of the metric (e.g. "counter", "gauge", ...)
      value - value of the collected metric
      epochInMillis - collect time in millis (see System.currentTimeMillis())
  • Method Details

    • isValueGreaterThan

      public boolean isValueGreaterThan​(QueryResult o)
    • getName

      @Nonnull public java.lang.String getName()
    • getType

      @Nullable public java.lang.String getType()
    • getEpochInMillis

      public long getEpochInMillis()
    • getEpoch

      public long getEpoch​(java.util.concurrent.TimeUnit timeUnit)
    • getValue

      @Nullable public java.lang.Object getValue()
    • toString

      public java.lang.String toString()
      Overrides:
      toString in class java.lang.Object
    • equals

      public boolean equals​(java.lang.Object o)
      Overrides:
      equals in class java.lang.Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class java.lang.Object