public class CachedAtomicInteger
extends java.lang.Object
DistributedAtomicNumber
and allocates values in chunks for better performanceConstructor and Description |
---|
CachedAtomicInteger(DistributedAtomicInteger number,
int cacheFactor) |
Modifier and Type | Method and Description |
---|---|
AtomicValue<java.lang.Integer> |
next()
Returns the next value (incrementing by 1).
|
public CachedAtomicInteger(DistributedAtomicInteger number, int cacheFactor)
number
- the number to usecacheFactor
- the number of values to allocate at a timepublic AtomicValue<java.lang.Integer> next() throws java.lang.Exception
java.lang.Exception
- errors