public interface Counter
Modifier and Type | Method and Description |
---|---|
void |
increment()
Increment the counter by 1.
|
default void |
increment(int amount)
Increment the counter by the provided amount.
|
void |
increment(long amount)
Increment the counter by the provided amount.
|
default boolean |
isNoop()
Determines whether this counter is a NOOP counter.
|
default MetricsContext.Unit |
unit()
The unit of the counter.
|
long |
value()
Reports the current count.
|
void increment()
default void increment(int amount)
amount
- to be incremented.void increment(long amount)
amount
- to be incremented.long value()
default MetricsContext.Unit unit()
default boolean isNoop()