private ValueType<?> counter(long count) { return ValueType.compose(count, MetricType.COUNTER); }
private ValueType<?> counter(long count) { return ValueType.compose(count, MetricType.COUNTER); }
private ValueType<?> gauge(double val) { return ValueType.compose(val, MetricType.GAUGE); }
private ValueType<?> gauge(double val) { return ValueType.compose(val, MetricType.GAUGE); }
private void reset() { m_known = m_unknown = 0; m_value = ValueType.compose(0, MetricType.GAUGE); m_attributes = Maps.newHashMap(); }
private static Sample sample(Timestamp timestamp, Resource resource, String name, Double value) { return new Sample(timestamp, resource, name, MetricType.GAUGE, ValueType.compose(value, MetricType.GAUGE)); }
private static ValueType<?> getValue(com.datastax.driver.core.Row row) { return ValueType.compose(row.getBytes(SchemaConstants.F_VALUE)); }
attrType.getName(), type, ValueType.compose(entry.getValue(), type)
attrType.getName(), type, ValueType.compose(entry.getValue(), type)
@Override public Sample apply(SampleDTO input) { return new Sample( Timestamp.fromEpochMillis(input.getTimestamp()), input.getContext(), new Resource(input.getResource().getId(), wrapMap(input.getResource().getAttributes())), input.getName(), input.getType(), ValueType.compose(input.getValue(), input.getType()), input.getAttributes()); } };
@Override public Sample apply(SampleDTO input) { return new Sample( Timestamp.fromEpochMillis(input.getTimestamp()), input.getContext(), new Resource(input.getResource().getId(), wrapMap(input.getResource().getAttributes())), input.getName(), input.getType(), ValueType.compose(input.getValue(), input.getType()), input.getAttributes()); } };