com.hazelcast.util.counters
Modifier and Type | Method and Description |
---|---|
long |
get()
Gets the current value of the counter.
|
void |
inc()
Increments the counter by one.
|
void |
inc(long amount)
Increments (or decrements) the counter by the given amount.
|
static MwCounter |
newMwCounter()
Creates a new MwCounter with 0 as its initial value.
|
static MwCounter |
newMwCounter(long initialValue)
Creates a new MwCounter with the given initial value.
|
String |
toString() |
public long get()
Counter
public void inc()
Counter
public void inc(long amount)
Counter
public static MwCounter newMwCounter()
public static MwCounter newMwCounter(long initialValue)
initialValue
- the initial value of the counter.Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.