public class DefaultCounterService extends Object implements CounterService
CounterService.| Constructor and Description |
|---|
DefaultCounterService(MetricWriter writer)
Create a
DefaultCounterService instance. |
| Modifier and Type | Method and Description |
|---|---|
void |
decrement(String metricName)
Decrement the specified counter by 1.
|
void |
increment(String metricName)
Increment the specified counter by 1.
|
void |
reset(String metricName)
Reset the specified counter.
|
public DefaultCounterService(MetricWriter writer)
DefaultCounterService instance.writer - the underlying writer used to manage metricspublic void increment(String metricName)
CounterServiceincrement in interface CounterServicemetricName - the name of the counterpublic void decrement(String metricName)
CounterServicedecrement in interface CounterServicemetricName - the name of the counterpublic void reset(String metricName)
CounterServicereset in interface CounterServicemetricName - the name of the counterCopyright © 2017 Pivotal Software, Inc.. All rights reserved.