public final class GridCacheAtomicStampedImpl<T,S> extends AtomicDataStructureProxy<GridCacheAtomicStampedValue<T,S>> implements GridCacheAtomicStampedEx<T,S>, IgniteChangeGlobalStateSupport, Externalizable
| Constructor and Description |
|---|
GridCacheAtomicStampedImpl()
Empty constructor required by
Externalizable. |
GridCacheAtomicStampedImpl(String name,
GridCacheInternalKey key,
IgniteInternalCache<GridCacheInternalKey,GridCacheAtomicStampedValue<T,S>> atomicView)
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Removes this atomic stamped.
|
boolean |
compareAndSet(T expVal,
T newVal,
S expStamp,
S newStamp)
Conditionally sets the new value and new stamp.
|
IgniteBiTuple<T,S> |
get()
Gets both current value and current stamp of atomic stamped.
|
void |
readExternal(ObjectInput in) |
void |
set(T val,
S stamp)
Unconditionally sets the value and the stamp.
|
S |
stamp()
Gets current stamp.
|
String |
toString() |
T |
value()
Gets current value.
|
void |
writeExternal(ObjectOutput out) |
checkRemoved, checkRemovedAfterFail, invalidateLocalState, key, name, needCheckNotRemoved, onActivate, onDeActivate, onRemoved, removed, restart, suspendclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitkeyneedCheckNotRemoved, onRemoved, restart, suspendname, removedonActivate, onDeActivatepublic GridCacheAtomicStampedImpl()
Externalizable.public GridCacheAtomicStampedImpl(String name, GridCacheInternalKey key, IgniteInternalCache<GridCacheInternalKey,GridCacheAtomicStampedValue<T,S>> atomicView)
name - Atomic stamped name.key - Atomic stamped key.atomicView - Atomic projection.public IgniteBiTuple<T,S> get()
get in interface IgniteAtomicStamped<T,S>public void set(T val, S stamp)
set in interface IgniteAtomicStamped<T,S>val - Value.stamp - Stamp.public boolean compareAndSet(T expVal, T newVal, S expStamp, S newStamp)
expVal
and expStamp are equal to current value and current stamp respectively.compareAndSet in interface IgniteAtomicStamped<T,S>expVal - Expected value.newVal - New value.expStamp - Expected stamp.newStamp - New stamp.true than value and stamp will be updated.public S stamp()
stamp in interface IgniteAtomicStamped<T,S>public T value()
value in interface IgniteAtomicStamped<T,S>public void close()
close in interface Closeableclose in interface AutoCloseableclose in interface IgniteAtomicStamped<T,S>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 Database and Caching Platform : ver. 2.9.0 Release Date : October 15 2020