- All Superinterfaces:
Instrument
A counter for registering long measurements, only incremental.
-
Method Summary
Methods inherited from interface org.mule.metrics.api.instrument.Instrument
getDescription, getMeter, getName, reset
-
Method Details
-
add
void add(long value) Add a value. Should only be positive.- Parameters:
value-
-
getValueAsLong
long getValueAsLong()- Returns:
- the value for the counter.
-
getUnit
String getUnit()- Returns:
- the unit for this measurement.
-
getValueAsInt
int getValueAsInt() -
incrementAndGetAsInt
int incrementAndGetAsInt()Increments the counter and gets the value as an int.- Returns:
- the resulting value as int.
-
incrementAndGetAsLong
long incrementAndGetAsLong()Increments the counter and gets the value as a long.- Returns:
- the resulting value as long.
-