Package com.codahale.metrics
Class Counter
java.lang.Object
com.codahale.metrics.Counter
An incrementing and decrementing counter metric.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
count
-
-
Constructor Details
-
Counter
public Counter()
-
-
Method Details
-
inc
public void inc()Increment the counter by one. -
inc
public void inc(long n) Increment the counter byn
.- Parameters:
n
- the amount by which the counter will be increased
-
dec
public void dec()Decrement the counter by one. -
dec
public void dec(long n) Decrement the counter byn
.- Parameters:
n
- the amount by which the counter will be decreased
-
getCount
public long getCount()Returns the counter's current value.
-