public final class GridCacheAtomicStampedImpl<T,S> extends Object implements GridCacheAtomicStampedEx<T,S>, Externalizable
| Constructor and Description |
|---|
GridCacheAtomicStampedImpl()
Empty constructor required by
Externalizable. |
GridCacheAtomicStampedImpl(String name,
GridCacheInternalKey key,
IgniteInternalCache<GridCacheInternalKey,GridCacheAtomicStampedValue<T,S>> atomicView,
GridCacheContext ctx)
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.
|
GridCacheInternalKey |
key()
Get current atomic stamped key.
|
String |
name()
Name of atomic stamped.
|
void |
onInvalid(Exception err) |
boolean |
onRemoved()
Set status of data structure as removed.
|
void |
readExternal(ObjectInput in) |
boolean |
removed()
Gets status of atomic.
|
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) |
public GridCacheAtomicStampedImpl()
Externalizable.public GridCacheAtomicStampedImpl(String name, GridCacheInternalKey key, IgniteInternalCache<GridCacheInternalKey,GridCacheAtomicStampedValue<T,S>> atomicView, GridCacheContext ctx)
name - Atomic stamped name.key - Atomic stamped key.atomicView - Atomic projection.ctx - Cache context.public String name()
name in interface IgniteAtomicStamped<T,S>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 boolean onRemoved()
onRemoved in interface GridCacheRemovablepublic void onInvalid(@Nullable Exception err)
onInvalid in interface GridCacheRemovableerr - Error which cause data structure to become invalid.public GridCacheInternalKey key()
key in interface GridCacheAtomicStampedEx<T,S>public boolean removed()
removed in interface IgniteAtomicStamped<T,S>true if atomic stamped was removed from cache, false otherwise.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 Fabric : ver. 1.1.0-incubating Release Date : May 20 2015