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