public class InMemoryRichGaugeRepository extends Object implements RichGaugeRepository
MetricWriter and RichGaugeReader. When you
set or increment
a metric value it is used to update a RichGauge. Gauge values can then be read
out using the reader operations.| Constructor and Description |
|---|
InMemoryRichGaugeRepository() |
| Modifier and Type | Method and Description |
|---|---|
long |
count()
Return the number of gauge values available.
|
Iterable<RichGauge> |
findAll()
Find all instances of rich gauge known to this reader.
|
RichGauge |
findOne(String metricName)
Find a single instance of a rich gauge by name.
|
void |
increment(Delta<?> delta)
Increment the value of a metric (or decrement if the delta is negative).
|
void |
reset(String metricName)
Reset the value of a metric, usually to zero value.
|
void |
set(Metric<?> metric)
Set the value of a metric.
|
public void increment(Delta<?> delta)
CounterWriterincrement in interface CounterWriterdelta - the amount to increment bypublic void set(Metric<?> metric)
GaugeWriterset in interface GaugeWritermetric - the valuepublic void reset(String metricName)
CounterWriterreset in interface CounterWritermetricName - the name to resetpublic RichGauge findOne(String metricName)
RichGaugeReaderfindOne in interface RichGaugeReadermetricName - the name of the gaugepublic Iterable<RichGauge> findAll()
RichGaugeReaderfindAll in interface RichGaugeReaderpublic long count()
RichGaugeReadercount in interface RichGaugeReaderCopyright © 2017 Pivotal Software, Inc.. All rights reserved.