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()
Counter
public long inc()
Counter
public long inc(long amount)
Counter
public static MwCounter newMwCounter()
public static MwCounter newMwCounter(long initialValue)
initialValue
- the initial value of the counter.Copyright © 2021 Hazelcast, Inc.. All Rights Reserved.