public class CachedAtomicLong
extends java.lang.Object
DistributedAtomicNumber and allocates values in chunks for better performance| Constructor | Description |
|---|---|
CachedAtomicLong(DistributedAtomicLong number,
int cacheFactor) |
| Modifier and Type | Method | Description |
|---|---|---|
AtomicValue<java.lang.Long> |
next() |
Returns the next value (incrementing by 1).
|
public CachedAtomicLong(DistributedAtomicLong number, int cacheFactor)
number - the number to usecacheFactor - the number of values to allocate at a timepublic AtomicValue<java.lang.Long> next() throws java.lang.Exception
java.lang.Exception - errorsCopyright © 2011–2018 The Apache Software Foundation. All rights reserved.