Modifier and Type | Method and Description |
---|---|
void |
increment()
Increment the counter by 1.
|
void |
increment(long amount)
Increment the counter by the provided amount.
|
java.lang.String |
toString() |
MetricsContext.Unit |
unit()
The unit of the counter.
|
long |
value()
Reports the current count.
|
public static final Counter NOOP
public void increment()
Counter
public void increment(long amount)
Counter
Implementations may skip the overflow check for better write throughput.
public long value()
Counter
public java.lang.String toString()
toString
in class java.lang.Object
public MetricsContext.Unit unit()
Counter