Tanzu GemFire Distributed Types Java API Reference
Interface DCounter
- All Superinterfaces:
DType
A distributed type, similar to a DAtomicLong, but with higher throughput and less potential
contention than DAtomicLong.
-
Method Summary
-
Method Details
-
get
long get()Get the current value.- Returns:
- the current value
-
increment
long increment(long delta) Update the value. The returned value reflects the current, local value. Any updates, performed by other clients, will not be reflected in the returned value. Useget()to retrieve the most up-to-date value.- Parameters:
delta- the amount to update by - can be either positive or negative- Returns:
- the current, local value
-