org.apache.ignite.internal.processors.datastructures

## Class GridCacheAtomicStampedValue<T,S>

- java.lang.Object
- - org.apache.ignite.internal.processors.datastructures.AtomicDataStructureValue
  - - org.apache.ignite.internal.processors.datastructures.GridCacheAtomicStampedValue<T,S>

All Implemented Interfaces:
  Externalizable, Serializable, GridCacheInternal, GridPeerDeployAware

    public final class GridCacheAtomicStampedValue<T,S>
    extends AtomicDataStructureValue
    implements GridPeerDeployAware

Atomic stamped value.

See Also:
  Serialized Form

### Constructor Summary

Constructors
Constructor and Description
`GridCacheAtomicStampedValue()` Empty constructor required for `Externalizable`.
`GridCacheAtomicStampedValue(T val, S stamp)` Constructor.

### Method Summary

All Methods Instance Methods Concrete Methods
`ClassLoader` `classLoader()` Gets class loader for the class.
`Class<?>` `deployClass()` Gets top level user class being deployed.
`IgniteBiTuple<T,S>` `get()`
`void` `readExternal(ObjectInput in)`
`void` `set(T val, S stamp)`
`S` `stamp()`
`String` `toString()`
`DataStructureType` `type()`
`T` `value()`
`void` `writeExternal(ObjectOutput out)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### GridCacheAtomicStampedValue

    public GridCacheAtomicStampedValue(T val,
                                       S stamp)

Constructor.

Parameters:
  `val` - Initial value.
  `stamp` - Initial stamp.

#### GridCacheAtomicStampedValue

    public GridCacheAtomicStampedValue()

Empty constructor required for `Externalizable`.

### Method Detail

#### type

    public DataStructureType type()

Specified by:
  `type` in class `AtomicDataStructureValue`
Returns:
  Data structure type.

#### set

    public void set(T val,
                    S stamp)

Parameters:
  `val` - New value.
  `stamp` - New stamp.

#### get

    public IgniteBiTuple<T,S> get()

Returns:
  Current value and stamp.

#### value

    public T value()

Returns:
  val Current value.

#### stamp

    public S stamp()

Returns:
  Current stamp.

#### writeExternal

    public void writeExternal(ObjectOutput out)
                       throws IOException

Specified by:
  `writeExternal` in interface `Externalizable`
Throws:
  `IOException`

#### readExternal

    public void readExternal(ObjectInput in)
                      throws IOException,
                             ClassNotFoundException

Specified by:
  `readExternal` in interface `Externalizable`
Throws:
  `IOException`
  `ClassNotFoundException`

#### deployClass

    public Class<?> deployClass()

Gets top level user class being deployed.

Specified by:
  `deployClass` in interface `GridPeerDeployAware`
Returns:
  Top level user deployed class.

#### classLoader

    public ClassLoader classLoader()

Gets class loader for the class. This class loader must be able to load the class returned from `GridPeerDeployAware.deployClass()` as well as all of its dependencies.

Note that in most cases the class loader returned from this method and the class loader for the class returned from `GridPeerDeployAware.deployClass()` method will be the same. If they are not the same, it is required that the class loader returned from this method still has to be able to load the deploy class and all its dependencies.

Specified by:
  `classLoader` in interface `GridPeerDeployAware`
Returns:
  Class loader for the class.

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.11.1
Release Date | : December 20 2021