public final class GridCacheAtomicSequenceImpl extends AtomicDataStructureProxy<GridCacheAtomicSequenceValue> implements GridCacheAtomicSequenceEx, IgniteChangeGlobalStateSupport, Externalizable
| Constructor and Description |
|---|
GridCacheAtomicSequenceImpl()
Empty constructor required by
Externalizable. |
GridCacheAtomicSequenceImpl(String name,
GridCacheInternalKey key,
IgniteInternalCache<GridCacheInternalKey,GridCacheAtomicSequenceValue> seqView,
int batchSize,
long locVal,
long upBound)
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
long |
addAndGet(long l)
Adds
l elements to atomic sequence and gets value of atomic sequence. |
int |
batchSize()
Get local batch size for this sequences.
|
void |
batchSize(int size)
Set local batch size for this sequences.
|
void |
close()
Removes this atomic sequence.
|
long |
get()
Gets current value of atomic sequence.
|
long |
getAndAdd(long l)
Gets current value of atomic sequence and adds
l elements. |
long |
getAndIncrement()
Gets and increments current value of atomic sequence.
|
long |
incrementAndGet()
Increments and returns the value of atomic sequence.
|
protected void |
invalidateLocalState() |
void |
readExternal(ObjectInput in) |
String |
toString() |
void |
writeExternal(ObjectOutput out) |
checkRemoved, key, name, needCheckNotRemoved, onActivate, onDeActivate, onRemoved, removed, restart, suspendclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitkeyneedCheckNotRemoved, onRemoved, restart, suspendname, removedonActivate, onDeActivatepublic GridCacheAtomicSequenceImpl()
Externalizable.public GridCacheAtomicSequenceImpl(String name, GridCacheInternalKey key, IgniteInternalCache<GridCacheInternalKey,GridCacheAtomicSequenceValue> seqView, int batchSize, long locVal, long upBound)
name - Sequence name.key - Sequence key.seqView - Sequence projection.batchSize - Sequence batch size.locVal - Local counter.upBound - Upper bound.public long get()
get in interface IgniteAtomicSequencepublic long incrementAndGet()
incrementAndGet in interface IgniteAtomicSequencepublic long getAndIncrement()
getAndIncrement in interface IgniteAtomicSequencepublic long addAndGet(long l)
l elements to atomic sequence and gets value of atomic sequence.addAndGet in interface IgniteAtomicSequencel - Number of added elements.public long getAndAdd(long l)
l elements.getAndAdd in interface IgniteAtomicSequencel - Number of added elements.public int batchSize()
batchSize in interface IgniteAtomicSequencepublic void batchSize(int size)
batchSize in interface IgniteAtomicSequencesize - Sequence batch size. Must be more then 0.protected void invalidateLocalState()
invalidateLocalState in class AtomicDataStructureProxy<GridCacheAtomicSequenceValue>public void close()
close in interface Closeableclose in interface AutoCloseableclose in interface IgniteAtomicSequencepublic void writeExternal(ObjectOutput out) throws IOException
writeExternal in interface ExternalizableIOExceptionpublic void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal in interface ExternalizableIOExceptionClassNotFoundException
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.7.5 Release Date : June 4 2019