Class CachedAtomicLong
java.lang.Object
org.apache.curator.framework.recipes.atomic.CachedAtomicLong
Uses an
DistributedAtomicNumber
and allocates values in chunks for better performance-
Constructor Summary
-
Method Summary
-
Constructor Details
-
CachedAtomicLong
- Parameters:
number
- the number to usecacheFactor
- the number of values to allocate at a time
-
-
Method Details
-
next
Returns the next value (incrementing by 1). If a new chunk of numbers is needed, it is requested from the number- Returns:
- next increment
- Throws:
Exception
- errors
-