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

## Class MvccUpdateDataRow

- 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
      - - org.apache.ignite.internal.processors.cache.tree.mvcc.data.MvccUpdateDataRow

All Implemented Interfaces:
  MvccUpdateVersionAware, MvccVersionAware, CacheDataRow, CacheSearchRow, Storable, BPlusTree.TreeVisitorClosure<CacheSearchRow,CacheDataRow>, MvccUpdateResult

    public class MvccUpdateDataRow
    extends MvccDataRow
    implements MvccUpdateResult, BPlusTree.TreeVisitorClosure<CacheSearchRow,CacheDataRow>

### 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`

### Fields inherited from interface org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree.TreeVisitorClosure

`CAN_WRITE, DIRTY, STOP`

### Constructor Summary

Constructors
Constructor and Description
`MvccUpdateDataRow(GridCacheContext cctx, KeyCacheObject key, CacheObject val, GridCacheVersion ver, int part, long expireTime, MvccSnapshot mvccSnapshot, MvccVersion newVer, CacheEntryPredicate filter, boolean primary, boolean lockOnly, boolean needHist, boolean fastUpdate, boolean needOldVal, boolean needPrevValue)`

### Method Summary

All Methods Instance Methods Concrete Methods
`List<MvccLinkAwareSearchRow>` `cleanupRows()`
`List<MvccLinkAwareSearchRow>` `history()`
`CacheInvokeResult` `invokeResult()`
`void` `invokeResult(CacheInvokeResult invokeRes)`
`boolean` `isKeyAbsentBefore()`
`CacheObject` `newValue()`
`CacheDataRow` `oldRow()`
`CacheObject` `oldValue()`
`ResultType` `resultType()`
`void` `resultType(ResultType type)`
`MvccVersion` `resultVersion()`
`int` `state()`
`String` `toString()`
`void` `value(CacheObject val0)`
`int` `visit(BPlusTree<CacheSearchRow,CacheDataRow> tree, BPlusIO<CacheSearchRow> io, long pageAddr, int idx, IgniteWriteAheadLogManager wal)` Performs inspection or operation on a specified row.

### Methods inherited from class org.apache.ignite.internal.processors.cache.tree.mvcc.data.MvccDataRow

`headerSize, keyAbsentBeforeFlag, keyAbsentBeforeFlag, mvccCoordinatorVersion, mvccCounter, mvccOperationCounter, mvccTxState, mvccTxState, mvccVersion, newMvccCoordinatorVersion, newMvccCounter, newMvccOperationCounter, newMvccTxState, newMvccTxState, newMvccVersion, readHeader, size`

### 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, 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.mvcc.MvccUpdateVersionAware

`newMvccVersion, newMvccVersion, newMvccVersion`

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

`mvccVersion, mvccVersion, mvccVersion`

### Constructor Detail

#### MvccUpdateDataRow

    public MvccUpdateDataRow(GridCacheContext cctx,
                             KeyCacheObject key,
                             CacheObject val,
                             GridCacheVersion ver,
                             int part,
                             long expireTime,
                             MvccSnapshot mvccSnapshot,
                             MvccVersion newVer,
                             @Nullable
                             CacheEntryPredicate filter,
                             boolean primary,
                             boolean lockOnly,
                             boolean needHist,
                             boolean fastUpdate,
                             boolean needOldVal,
                             boolean needPrevValue)

Parameters:
  `cctx` - Cache context.
  `key` - Key.
  `val` - Value.
  `ver` - Version.
  `part` - Partition.
  `expireTime` - Expire time.
  `mvccSnapshot` - MVCC snapshot.
  `newVer` - Update version.
  `primary` - Primary node flag.
  `lockOnly` - Whether no actual update should be done and the only thing to do is to acquire lock.
  `needHist` - Whether to collect rows created or affected by the current tx.
  `fastUpdate` - Fast update visit mode.
  `needOldVal` - `True` if need old value.

### Method Detail

#### visit

    public int visit(BPlusTree<CacheSearchRow,CacheDataRow> tree,
                     BPlusIO<CacheSearchRow> io,
                     long pageAddr,
                     int idx,
                     IgniteWriteAheadLogManager wal)
              throws IgniteCheckedException

Performs inspection or operation on a specified row.

Specified by:
  `visit` in interface `BPlusTree.TreeVisitorClosure<CacheSearchRow,CacheDataRow>`
Parameters:
  `tree` - The tree.
  `io` - Th tree IO object.
  `pageAddr` - The page address.
  `idx` - The item index.
Returns:
  state bitset.
Throws:
  `IgniteCheckedException` - If failed.

#### state

    public int state()

Specified by:
  `state` in interface `BPlusTree.TreeVisitorClosure<CacheSearchRow,CacheDataRow>`
Returns:
  state bitset.

#### oldRow

    public CacheDataRow oldRow()

Returns:
  Old row.

#### resultType

    @NotNull
    public ResultType resultType()

Specified by:
  `resultType` in interface `MvccUpdateResult`
Returns:
  Result type.

#### cleanupRows

    public List<MvccLinkAwareSearchRow> cleanupRows()

Returns:
  Rows which are safe to cleanup.

#### resultVersion

    public MvccVersion resultVersion()

Specified by:
  `resultVersion` in interface `MvccUpdateResult`
Returns:
  Result version.

#### history

    public List<MvccLinkAwareSearchRow> history()

Specified by:
  `history` in interface `MvccUpdateResult`
Returns:
  Collection of row created or affected by the current tx.

#### newValue

    public CacheObject newValue()

Specified by:
  `newValue` in interface `MvccUpdateResult`
Returns:
  New value of updated entry.

#### oldValue

    public CacheObject oldValue()

Specified by:
  `oldValue` in interface `MvccUpdateResult`
Returns:
  Old value.

#### isKeyAbsentBefore

    public boolean isKeyAbsentBefore()

Specified by:
  `isKeyAbsentBefore` in interface `MvccUpdateResult`
Returns:
  `True` if this key was inserted in the cache with this row in the same transaction.

#### value

    public void value(CacheObject val0)

#### invokeResult

    public void invokeResult(CacheInvokeResult invokeRes)

#### invokeResult

    public CacheInvokeResult invokeResult()

Specified by:
  `invokeResult` in interface `MvccUpdateResult`
Returns:
  Invoke result.

#### resultType

    public void resultType(ResultType type)

#### toString

    public String toString()

Overrides:
  `toString` in class `MvccDataRow`

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.7.6
Release Date | : September 11 2019