| Modifier and Type | Method and Description |
|---|---|
long |
get()
Gets the current value of the counter.
|
long |
inc()
Increments the counter by one.
|
long |
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()
Counterpublic long inc()
Counterpublic long inc(long amount)
Counterpublic static MwCounter newMwCounter()
public static MwCounter newMwCounter(long initialValue)
initialValue - the initial value of the counter.Copyright © 2016 Hazelcast, Inc.. All Rights Reserved.