Package org.apache.ignite
Interface IgniteAtomicStamped<T,S>
- 
- All Superinterfaces:
- AutoCloseable,- Closeable
 
 public interface IgniteAtomicStamped<T,S> extends Closeable This interface provides a rich API for working with distributed atomic stamped value.FunctionalityDistributed atomic stamped includes the following main functionality:- 
 Method get()gets both value and stamp of atomic.
- 
 Method value()gets current value of atomic.
- 
 Method stamp()gets current stamp of atomic.
- 
 Method set(Object, Object)unconditionally sets the value and the stamp in the atomic.
- 
 Methods compareAndSet(...)conditionally set the value and the stamp in the atomic.
- 
 Method name()gets name of atomic stamped.
 Creating Distributed Atomic StampedInstance of distributed atomic stamped can be created by calling the following method:
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclose()Removes this atomic stamped.booleancompareAndSet(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.Stringname()Name of atomic stamped.booleanremoved()Gets status of atomic.voidset(T val, S stamp)Unconditionally sets the value and the stamp.Sstamp()Gets current stamp.Tvalue()Gets current value.
 
- 
- 
- 
Method Detail- 
nameString name() Name of atomic stamped.- Returns:
- Name of atomic stamped.
 
 - 
getIgniteBiTuple<T,S> get() throws IgniteException Gets both current value and current stamp of atomic stamped.- Returns:
- both current value and current stamp of atomic stamped.
- Throws:
- IgniteException- If operation failed.
 
 - 
setvoid set(T val, S stamp) throws IgniteException Unconditionally sets the value and the stamp.- Parameters:
- val- Value.
- stamp- Stamp.
- Throws:
- IgniteException- If operation failed.
 
 - 
compareAndSetboolean compareAndSet(T expVal, T newVal, S expStamp, S newStamp) throws IgniteException Conditionally sets the new value and new stamp. They will be set ifexpValandexpStampare equal to current value and current stamp respectively.- Parameters:
- expVal- Expected value.
- newVal- New value.
- expStamp- Expected stamp.
- newStamp- New stamp.
- Returns:
- Result of operation execution. If truethan value and stamp will be updated.
- Throws:
- IgniteException- If operation failed.
 
 - 
stampS stamp() throws IgniteException Gets current stamp.- Returns:
- Current stamp.
- Throws:
- IgniteException- If operation failed.
 
 - 
valueT value() throws IgniteException Gets current value.- Returns:
- Current value.
- Throws:
- IgniteException- If operation failed.
 
 - 
removedboolean removed() Gets status of atomic.- Returns:
- trueif atomic stamped was removed from cache,- falseotherwise.
 
 - 
closevoid close() Removes this atomic stamped.- Specified by:
- closein interface- AutoCloseable
- Specified by:
- closein interface- Closeable
- Throws:
- IgniteException- If operation failed.
 
 
- 
 
-