public class InMemoryMultiMetricRepository extends Object implements MultiMetricRepository
MultiMetricRepository implementation backed by a
InMemoryMetricRepository.| Constructor and Description |
|---|
InMemoryMultiMetricRepository()
Create a new
InMemoryMetricRepository backed by a new
InMemoryMetricRepository. |
InMemoryMultiMetricRepository(InMemoryMetricRepository repository)
Create a new
InMemoryMetricRepository backed by the specified
InMemoryMetricRepository. |
| Modifier and Type | Method and Description |
|---|---|
long |
countGroups()
The number of groups available in this repository.
|
Iterable<Metric<?>> |
findAll(String metricNamePrefix)
Find all metrics whose name starts with the given prefix.
|
Iterable<String> |
groups()
The names of all the groups known to this repository.
|
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.
|
public InMemoryMultiMetricRepository()
InMemoryMetricRepository backed by a new
InMemoryMetricRepository.public InMemoryMultiMetricRepository(InMemoryMetricRepository repository)
InMemoryMetricRepository backed by the specified
InMemoryMetricRepository.repository - the backing repositorypublic void set(String group, Collection<Metric<?>> values)
PrefixMetricWriterset in interface PrefixMetricWritergroup - the name of the groupvalues - the metric values to savepublic void increment(String group, Delta<?> delta)
PrefixMetricWritergroup + "." + delta.name.increment in interface PrefixMetricWritergroup - the name of the groupdelta - the amount to increment bypublic Iterable<String> groups()
MultiMetricRepositorygroups in interface MultiMetricRepositorypublic long countGroups()
MultiMetricRepositorycountGroups in interface MultiMetricRepositorypublic void reset(String group)
PrefixMetricWriterreset in interface PrefixMetricWritergroup - reset the whole grouppublic Iterable<Metric<?>> findAll(String metricNamePrefix)
PrefixMetricReaderfindAll in interface PrefixMetricReadermetricNamePrefix - the prefix for metric namesCopyright © 2019 Pivotal Software, Inc.. All rights reserved.