org.apache.ignite.internal.processors.cache.tree.mvcc.data

## Class MvccDataRow

- java.lang.Object
- - org.apache.ignite.internal.processors.cache.persistence.CacheDataRowAdapter
  - - org.apache.ignite.internal.processors.cache.tree.DataRow
    - - org.apache.ignite.internal.processors.cache.tree.mvcc.data.MvccDataRow

All Implemented Interfaces:
  MvccUpdateVersionAware, MvccVersionAware, CacheDataRow, CacheSearchRow, Storable

Direct Known Subclasses:
  MvccUpdateDataRow

    public class MvccDataRow
    extends DataRow

### Nested Class Summary

### Nested classes/interfaces inherited from class org.apache.ignite.internal.processors.cache.persistence.CacheDataRowAdapter

`CacheDataRowAdapter.RowData`

### Field Summary

### Fields inherited from class org.apache.ignite.internal.processors.cache.tree.DataRow

`hash, part`

### Fields inherited from class org.apache.ignite.internal.processors.cache.persistence.CacheDataRowAdapter

`cacheId, expireTime, key, link, val, ver, verReady`

### Constructor Summary

Constructors
Constructor and Description
`MvccDataRow()`
`MvccDataRow(CacheGroupContext grp, int hash, long link, int part, CacheDataRowAdapter.RowData rowData, long crdVer, long mvccCntr, int mvccOpCntr, boolean skipVer)`
`MvccDataRow(KeyCacheObject key, CacheObject val, GridCacheVersion ver, int part, long expireTime, int cacheId, MvccVersion mvccVer, MvccVersion newMvccVer)`
`MvccDataRow(long link)`

### Method Summary

All Methods Instance Methods Concrete Methods
`int` `headerSize()`
`protected boolean` `keyAbsentBeforeFlag()`
`protected void` `keyAbsentBeforeFlag(boolean flag)`
`long` `mvccCoordinatorVersion()`
`long` `mvccCounter()`
`int` `mvccOperationCounter()`
`byte` `mvccTxState()`
`void` `mvccTxState(byte mvccTxState)`
`void` `mvccVersion(long crd, long cntr, int opCntr)` Sets mvcc version.
`long` `newMvccCoordinatorVersion()`
`long` `newMvccCounter()`
`int` `newMvccOperationCounter()`
`byte` `newMvccTxState()`
`void` `newMvccTxState(byte newMvccTxState)`
`void` `newMvccVersion(long crd, long cntr, int opCntr)` Sets new mvcc version.
`protected int` `readHeader(GridCacheSharedContext<?,?> sharedCtx, long addr, int off, CacheDataRowAdapter.RowData rowData)` Reads row header (i.e.
`int` `size()`
`String` `toString()`

### Methods inherited from class org.apache.ignite.internal.processors.cache.tree.DataRow

`cacheId, hash, key, link, partition`

### Methods inherited from class org.apache.ignite.internal.processors.cache.persistence.CacheDataRowAdapter

`cacheId, expireTime, initFromDataPage, initFromLink, initFromLink, initFromLink, isReady, key, link, readFragment, readFullRow, readIncompleteCacheId, readIncompleteExpireTime, readIncompleteKey, readIncompleteValue, readIncompleteVersion, value, version`

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

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

### Methods inherited from interface org.apache.ignite.internal.processors.cache.persistence.CacheDataRow

`ioVersions`

### Methods inherited from interface org.apache.ignite.internal.processors.cache.mvcc.MvccUpdateVersionAware

`newMvccVersion, newMvccVersion, newMvccVersion`

### Methods inherited from interface org.apache.ignite.internal.processors.cache.mvcc.MvccVersionAware

`mvccVersion, mvccVersion, mvccVersion`

### Constructor Detail

#### MvccDataRow

    public MvccDataRow(long link)

Parameters:
  `link` - Link.

#### MvccDataRow

    public MvccDataRow(CacheGroupContext grp,
                       int hash,
                       long link,
                       int part,
                       CacheDataRowAdapter.RowData rowData,
                       long crdVer,
                       long mvccCntr,
                       int mvccOpCntr,
                       boolean skipVer)

Parameters:
  `grp` - Context.
  `hash` - Key hash.
  `link` - Link.
  `part` - Partition number.
  `rowData` - Data.
  `crdVer` - Mvcc coordinator version.
  `mvccCntr` - Mvcc counter.
  `mvccOpCntr` - Mvcc operation counter.
  `skipVer` - Skip version flag.

#### MvccDataRow

    public MvccDataRow()

#### MvccDataRow

    public MvccDataRow(KeyCacheObject key,
                       CacheObject val,
                       GridCacheVersion ver,
                       int part,
                       long expireTime,
                       int cacheId,
                       MvccVersion mvccVer,
                       MvccVersion newMvccVer)

Parameters:
  `key` - Key.
  `val` - Value.
  `ver` - Version.
  `part` - Partition.
  `expireTime` - Expire time.
  `cacheId` - Cache ID.
  `mvccVer` - Mvcc version.
  `newMvccVer` - New mvcc version.

### Method Detail

#### readHeader

    protected int readHeader(GridCacheSharedContext<?,?> sharedCtx,
                             long addr,
                             int off,
                             CacheDataRowAdapter.RowData rowData)

Reads row header (i.e. MVCC info) which should be located on the very first page od data.

Overrides:
  `readHeader` in class `CacheDataRowAdapter`
Parameters:
  `sharedCtx` - Shared context.
  `addr` - Address.
  `off` - Offset
  `rowData` - Required row data.
Returns:
  Number of bytes read.

#### mvccCoordinatorVersion

    public long mvccCoordinatorVersion()

Specified by:
  `mvccCoordinatorVersion` in interface `MvccVersionAware`
Overrides:
  `mvccCoordinatorVersion` in class `CacheDataRowAdapter`
Returns:
  Mvcc coordinator version.

#### mvccCounter

    public long mvccCounter()

Specified by:
  `mvccCounter` in interface `MvccVersionAware`
Overrides:
  `mvccCounter` in class `CacheDataRowAdapter`
Returns:
  Mvcc counter.

#### mvccOperationCounter

    public int mvccOperationCounter()

Specified by:
  `mvccOperationCounter` in interface `MvccVersionAware`
Overrides:
  `mvccOperationCounter` in class `CacheDataRowAdapter`
Returns:
  Mvcc operation counter.

#### mvccTxState

    public byte mvccTxState()

Specified by:
  `mvccTxState` in interface `MvccVersionAware`
Overrides:
  `mvccTxState` in class `CacheDataRowAdapter`
Returns:
  Tx state hint for 'created' mvcc version.

#### newMvccCoordinatorVersion

    public long newMvccCoordinatorVersion()

Specified by:
  `newMvccCoordinatorVersion` in interface `MvccUpdateVersionAware`
Overrides:
  `newMvccCoordinatorVersion` in class `CacheDataRowAdapter`
Returns:
  New mvcc coordinator version.

#### newMvccCounter

    public long newMvccCounter()

Specified by:
  `newMvccCounter` in interface `MvccUpdateVersionAware`
Overrides:
  `newMvccCounter` in class `CacheDataRowAdapter`
Returns:
  New mvcc counter.

#### newMvccOperationCounter

    public int newMvccOperationCounter()

Specified by:
  `newMvccOperationCounter` in interface `MvccUpdateVersionAware`
Overrides:
  `newMvccOperationCounter` in class `CacheDataRowAdapter`
Returns:
  New mvcc operation counter.

#### newMvccTxState

    public byte newMvccTxState()

Specified by:
  `newMvccTxState` in interface `MvccUpdateVersionAware`
Overrides:
  `newMvccTxState` in class `CacheDataRowAdapter`
Returns:
  New Tx state.

#### newMvccVersion

    public void newMvccVersion(long crd,
                               long cntr,
                               int opCntr)

Sets new mvcc version.

Parameters:
  `crd` - New mvcc coordinator version.
  `cntr` - New mvcc counter.
  `opCntr` - New mvcc operation counter.

#### mvccVersion

    public void mvccVersion(long crd,
                            long cntr,
                            int opCntr)

Sets mvcc version.

Parameters:
  `crd` - Mvcc coordinator version.
  `cntr` - Mvcc counter.
  `opCntr` - Mvcc operation counter.

#### mvccTxState

    public void mvccTxState(byte mvccTxState)

Parameters:
  `mvccTxState` - Mvcc version Tx state hint.

#### newMvccTxState

    public void newMvccTxState(byte newMvccTxState)

Parameters:
  `newMvccTxState` - New Mvcc version Tx state hint.

#### keyAbsentBeforeFlag

    protected boolean keyAbsentBeforeFlag()

Returns:
  `True` if key absent before.

#### keyAbsentBeforeFlag

    protected void keyAbsentBeforeFlag(boolean flag)

Parameters:
  `flag` - `True` if key is absent before.

#### size

    public int size()
             throws IgniteCheckedException

Specified by:
  `size` in interface `Storable`
Overrides:
  `size` in class `CacheDataRowAdapter`
Returns:
  Row size in page.
Throws:
  `IgniteCheckedException` - If failed.

#### headerSize

    public int headerSize()

Specified by:
  `headerSize` in interface `Storable`
Overrides:
  `headerSize` in class `CacheDataRowAdapter`
Returns:
  Row header size in page. Header is indivisible part of row which is entirely available on the very first page followed by the row link.

#### toString

    public String toString()

Overrides:
  `toString` in class `CacheDataRowAdapter`

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.8.0
Release Date | : February 27 2020