public class LongCounter extends Metric
Constructor and Description |
---|
LongCounter() |
LongCounter(LongAdder longAdder) |
Modifier and Type | Method and Description |
---|---|
void |
dec()
Decrement the counter by one.
|
void |
dec(long n)
Decrement the counter by
n . |
long |
getCount()
Returns the counter's current value.
|
void |
inc()
Increment the counter by one.
|
void |
inc(long n)
Increment the counter by
n . |
void |
reset()
Resets the counter to zero.
|
public LongCounter()
public LongCounter(LongAdder longAdder)
public long getCount()
public void inc()
public void inc(long n)
n
.n
- the amount by which the counter will be increasedpublic void dec()
public void dec(long n)
n
.n
- the amount by which the counter will be decreasedpublic void reset()
Copyright © GigaSpaces.