Exemple #1
0
 public static boolean isKnownMetricType(DataType incoming) {
   return incoming.equals(STRING)
       || incoming.equals(INT)
       || incoming.equals(LONG)
       || incoming.equals(DOUBLE)
       || incoming.equals(BOOLEAN);
 }
Exemple #2
0
  public Metric(
      Locator locator, Object metricValue, long collectionTime, TimeValue ttl, String unit) {
    this.locator = locator;
    this.metricValue = metricValue;
    this.collectionTime = collectionTime;
    this.metricType = DataType.getMetricType(metricValue);
    this.unit = unit;

    setTtl(ttl);
  }
Exemple #3
0
 public boolean isBoolean() {
   return DataType.isBooleanMetric(metricValue);
 }
Exemple #4
0
 public boolean isString() {
   return DataType.isStringMetric(metricValue);
 }
Exemple #5
0
 public boolean isNumeric() {
   return DataType.isNumericMetric(metricValue);
 }