org.apache.ignite.internal.processors.cache.persistence

## Class DataRowCacheAware

- 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.persistence.DataRowCacheAware

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

    public class DataRowCacheAware
    extends DataRow

Data row implementation that can optionally hide the cache identifier and can set `null` as value.
It is used to simplify storing a data row into page memory, because in some cases the cache identifier is not stored on the data pages, but is required to link this data row in `BPlusTree`.

### 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
`DataRowCacheAware(KeyCacheObject key, @Nullable CacheObject val, GridCacheVersion ver, int part, long expireTime, int cacheId, boolean storeCacheId)`

### Method Summary

All Methods Instance Methods Concrete Methods
`int` `cacheId()`
`void` `storeCacheId(boolean storeCacheId)`
`@Nullable CacheObject` `value()`

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

`expireTime, headerSize, initFromDataPage, initFromLink, initFromLink, initFromLink, isReady, key, link, mvccCoordinatorVersion, mvccCounter, mvccOperationCounter, mvccTxState, newMvccCoordinatorVersion, newMvccCounter, newMvccOperationCounter, newMvccTxState, readFragment, readFullRow, readHeader, readIncompleteCacheId, readIncompleteExpireTime, readIncompleteKey, readIncompleteValue, readIncompleteVersion, size, toString, 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, newMvccVersion`

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

`mvccVersion, mvccVersion, mvccVersion, mvccVersion`

### Constructor Detail

#### DataRowCacheAware

    public DataRowCacheAware(KeyCacheObject key,
                             @Nullable
                             @Nullable CacheObject val,
                             GridCacheVersion ver,
                             int part,
                             long expireTime,
                             int cacheId,
                             boolean storeCacheId)

Parameters:
  `key` - Key.
  `val` - Value.
  `ver` - Version.
  `part` - Partition.
  `expireTime` - Expire time.
  `cacheId` - Cache ID.
  `storeCacheId` - Flag indicates that cacheId should be stored in data page.

### Method Detail

#### storeCacheId

    public void storeCacheId(boolean storeCacheId)

Parameters:
  `storeCacheId` - Flag indicates that cacheId should be stored in data page.

#### cacheId

    public int cacheId()

Specified by:
  `cacheId` in interface `CacheSearchRow`
Overrides:
  `cacheId` in class `CacheDataRowAdapter`
Returns:
  Cache ID or `0` if cache ID is not defined.

#### value

    @Nullable
    public @Nullable CacheObject value()

Specified by:
  `value` in interface `CacheDataRow`
Overrides:
  `value` in class `CacheDataRowAdapter`
Returns:
  Cache value.

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.8.1
Release Date | : May 21 2020