public final class GridCacheAtomicLongImpl extends AtomicDataStructureProxy<GridCacheAtomicLongValue> implements GridCacheAtomicLongEx, IgniteChangeGlobalStateSupport, Externalizable
| Constructor and Description |
|---|
GridCacheAtomicLongImpl()
Empty constructor required by
Externalizable. |
GridCacheAtomicLongImpl(String name,
GridCacheInternalKey key,
IgniteInternalCache<GridCacheInternalKey,GridCacheAtomicLongValue> atomicView)
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
long |
addAndGet(long l)
Adds
l and gets current value of atomic long. |
void |
close()
Removes this atomic long.
|
boolean |
compareAndSet(long expVal,
long newVal)
Atomically compares current value to the expected value, and if they are equal, sets current value
to new value.
|
long |
compareAndSetAndGet(long expVal,
long newVal) |
long |
decrementAndGet()
Decrements and gets current value of atomic long.
|
long |
get()
Gets current value of atomic long.
|
long |
getAndAdd(long l)
Gets current value of atomic long and adds
l. |
long |
getAndDecrement()
Gets and decrements current value of atomic long.
|
long |
getAndIncrement()
Gets and increments current value of atomic long.
|
long |
getAndSet(long l)
Gets current value of atomic long and sets new value
l of atomic long. |
long |
incrementAndGet()
Increments and gets current value of atomic long.
|
void |
readExternal(ObjectInput in) |
String |
toString() |
void |
writeExternal(ObjectOutput out) |
checkRemoved, invalidateLocalState, key, name, needCheckNotRemoved, onActivate, onDeActivate, onRemoved, removed, restart, suspendclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitkeyneedCheckNotRemoved, onRemoved, restart, suspendname, removedonActivate, onDeActivatepublic GridCacheAtomicLongImpl()
Externalizable.public GridCacheAtomicLongImpl(String name, GridCacheInternalKey key, IgniteInternalCache<GridCacheInternalKey,GridCacheAtomicLongValue> atomicView)
name - Atomic long name.key - Atomic long key.atomicView - Atomic projection.public long get()
get in interface IgniteAtomicLongpublic long incrementAndGet()
incrementAndGet in interface IgniteAtomicLongpublic long getAndIncrement()
getAndIncrement in interface IgniteAtomicLongpublic long addAndGet(long l)
l and gets current value of atomic long.addAndGet in interface IgniteAtomicLongl - Number which will be added.public long getAndAdd(long l)
l.getAndAdd in interface IgniteAtomicLongl - Number which will be added.public long decrementAndGet()
decrementAndGet in interface IgniteAtomicLongpublic long getAndDecrement()
getAndDecrement in interface IgniteAtomicLongpublic long getAndSet(long l)
l of atomic long.getAndSet in interface IgniteAtomicLongl - New value of atomic long.public boolean compareAndSet(long expVal,
long newVal)
compareAndSet in interface IgniteAtomicLongexpVal - Expected atomic long's value.newVal - New atomic long's value to set if current value equal to expected value.True if comparison succeeded, false otherwise.public long compareAndSetAndGet(long expVal,
long newVal)
expVal - Expected value.newVal - New value.public void close()
close in interface Closeableclose in interface AutoCloseableclose in interface IgniteAtomicLongpublic 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