Class BufferCounterService
- java.lang.Object
- org.springframework.boot.actuate.metrics.buffer.BufferCounterService
- All Implemented Interfaces:
CounterService
@UsesJava8 public class BufferCounterService extends Object implements CounterService
Fast implementation ofCounterService
usingCounterBuffers
.- Since:
- 1.3.0
Constructor Summary
Constructors Constructor Description BufferCounterService(CounterBuffers buffers)
Create aBufferCounterService
instance.
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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.
Constructor Detail
BufferCounterService
public BufferCounterService(CounterBuffers buffers)
Create aBufferCounterService
instance.- Parameters:
buffers
- the underlying buffers used to store metrics
Method Detail
increment
public void increment(String metricName)
Description copied from interface:CounterService
Increment the specified counter by 1.- Specified by:
increment
in interfaceCounterService
- Parameters:
metricName
- the name of the counter
decrement
public void decrement(String metricName)
Description copied from interface:CounterService
Decrement the specified counter by 1.- Specified by:
decrement
in interfaceCounterService
- Parameters:
metricName
- the name of the counter
reset
public void reset(String metricName)
Description copied from interface:CounterService
Reset the specified counter.- Specified by:
reset
in interfaceCounterService
- Parameters:
metricName
- the name of the counter