public final class GridCacheAtomicSequenceImpl extends Object implements GridCacheAtomicSequenceEx, IgniteChangeGlobalStateSupport, Externalizable
| Constructor and Description |
|---|
GridCacheAtomicSequenceImpl()
Empty constructor required by
Externalizable. |
GridCacheAtomicSequenceImpl(String name,
GridCacheInternalKey key,
IgniteInternalCache<GridCacheInternalKey,GridCacheAtomicSequenceValue> seqView,
GridCacheContext ctx,
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.
|
GridCacheInternalKey |
key()
Get current sequence key.
|
String |
name()
Name of atomic sequence.
|
void |
needCheckNotRemoved() |
void |
onActivate(GridKernalContext kctx)
Called when cluster performing activation.
|
void |
onDeActivate(GridKernalContext kctx)
Called when cluster performing deactivation.
|
boolean |
onRemoved()
Set status of data structure as removed.
|
void |
readExternal(ObjectInput in) |
boolean |
removed()
Gets status of atomic sequence.
|
String |
toString() |
void |
writeExternal(ObjectOutput out) |
public GridCacheAtomicSequenceImpl()
Externalizable.public GridCacheAtomicSequenceImpl(String name, GridCacheInternalKey key, IgniteInternalCache<GridCacheInternalKey,GridCacheAtomicSequenceValue> seqView, GridCacheContext ctx, int batchSize, long locVal, long upBound)
name - Sequence name.key - Sequence key.seqView - Sequence projection.ctx - CacheContext.batchSize - Sequence batch size.locVal - Local counter.upBound - Upper bound.public String name()
name in interface IgniteAtomicSequencepublic 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.public boolean onRemoved()
onRemoved in interface GridCacheRemovablepublic void needCheckNotRemoved()
needCheckNotRemoved in interface GridCacheRemovablepublic GridCacheInternalKey key()
key in interface GridCacheAtomicSequenceExpublic boolean removed()
removed in interface IgniteAtomicSequencetrue if atomic sequence was removed from cache, false otherwise.public void close()
close in interface Closeableclose in interface AutoCloseableclose in interface IgniteAtomicSequencepublic void onActivate(GridKernalContext kctx) throws IgniteCheckedException
onActivate in interface IgniteChangeGlobalStateSupportkctx - Kernal context.IgniteCheckedException - If failed.public void onDeActivate(GridKernalContext kctx) throws IgniteCheckedException
onDeActivate in interface IgniteChangeGlobalStateSupportkctx - Kernal context.IgniteCheckedException - If failed.public void writeExternal(ObjectOutput out) throws IOException
writeExternal in interface ExternalizableIOExceptionpublic void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal in interface ExternalizableIOExceptionClassNotFoundException
Follow @ApacheIgnite
Ignite Fabric : ver. 2.0.0 Release Date : April 30 2017