Interface PrefixMetricWriter
- All Known Subinterfaces:
MultiMetricRepository
- All Known Implementing Classes:
InMemoryMultiMetricRepository
,RedisMultiMetricRepository
public interface PrefixMetricWriter
A writer for metrics that allows efficient storage of groups of metrics with a common name prefix (their group name).- Since:
- 1.1.0
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
increment(String group, Delta<?> delta)
Increment the value of a metric (or decrement if the delta is negative).void
reset(String group)
Rest the values of all metrics in the group.void
set(String group, Collection<Metric<?>> values)
Save some metric values and associate them with a group name.
Method Detail
set
void set(String group, Collection<Metric<?>> values)
Save some metric values and associate them with a group name.- Parameters:
group
- the name of the groupvalues
- the metric values to save
increment
void increment(String group, Delta<?> delta)
Increment the value of a metric (or decrement if the delta is negative). The name of the metric to increment isgroup + "." + delta.name
.- Parameters:
group
- the name of the groupdelta
- the amount to increment by