示例#1
0
 public static boolean isKnownMetricType(DataType incoming) {
   return incoming.equals(STRING)
       || incoming.equals(INT)
       || incoming.equals(LONG)
       || incoming.equals(DOUBLE)
       || incoming.equals(BOOLEAN);
 }
示例#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);
  }
示例#3
0
 public boolean isBoolean() {
   return DataType.isBooleanMetric(metricValue);
 }
示例#4
0
 public boolean isString() {
   return DataType.isStringMetric(metricValue);
 }
示例#5
0
 public boolean isNumeric() {
   return DataType.isNumericMetric(metricValue);
 }