org.apache.ignite.internal.processors.cache

## Class IgniteCacheOffheapManagerImpl.CacheDataStoreImpl

- java.lang.Object
- - org.apache.ignite.internal.processors.cache.IgniteCacheOffheapManagerImpl.CacheDataStoreImpl

All Implemented Interfaces:
  IgniteCacheOffheapManager.CacheDataStore

Enclosing class:
  IgniteCacheOffheapManagerImpl

    public static class IgniteCacheOffheapManagerImpl.CacheDataStoreImpl
    extends Object
    implements IgniteCacheOffheapManager.CacheDataStore

### Field Summary

Fields
`protected PartitionUpdateCounter` `pCntr` Update counter.

### Constructor Summary

Constructors
Constructor and Description
`CacheDataStoreImpl(int partId, CacheDataRowStore rowStore, CacheDataTree dataTree, Supplier<PendingEntriesTree> pendingEntries, CacheGroupContext grp, GridSpinBusyLock busyLock, IgniteLogger log, @Nullable Supplier<GridQueryRowCacheCleaner> cleaner)`

### Method Summary

All Methods Instance Methods Concrete Methods
`long` `cacheSize(int cacheId)`
`Map<Integer,Long>` `cacheSizes()`
`int` `cleanup(GridCacheContext cctx, @Nullable List<MvccLinkAwareSearchRow> cleanupRows)`
`void` `clear(int cacheId)` Clears all the records associated with logical cache with given ID.
`CacheDataRow` `createRow(GridCacheContext cctx, KeyCacheObject key, CacheObject val, GridCacheVersion ver, long expireTime, @Nullable CacheDataRow oldRow)`
`GridCursor<? extends CacheDataRow>` `cursor()`
`GridCursor<? extends CacheDataRow>` `cursor(int cacheId)`
`GridCursor<? extends CacheDataRow>` `cursor(int cacheId, KeyCacheObject lower, KeyCacheObject upper)`
`GridCursor<? extends CacheDataRow>` `cursor(int cacheId, KeyCacheObject lower, KeyCacheObject upper, Object x)`
`GridCursor<? extends CacheDataRow>` `cursor(int cacheId, KeyCacheObject lower, KeyCacheObject upper, Object x, MvccSnapshot snapshot)`
`GridCursor<? extends CacheDataRow>` `cursor(int cacheId, MvccSnapshot mvccSnapshot)`
`GridCursor<? extends CacheDataRow>` `cursor(MvccSnapshot mvccSnapshot)`
`GridCursor<? extends CacheDataRow>` `cursor(Object x)`
`void` `destroy()` Destroys the tree associated with the store.
`boolean` `destroyed()`
`GridLongList` `finalizeUpdateCounters()` Flushes pending update counters closing all possible gaps.
`CacheDataRow` `find(GridCacheContext cctx, KeyCacheObject key)`
`long` `fullSize()`
`long` `getAndIncrementUpdateCounter(long delta)` Returns current value and updates counter by delta.
`boolean` `init()` Initialize data store if it exists.
`long` `initialUpdateCounter()`
`void` `insertRows(Collection<DataRowCacheAware> rows, IgnitePredicateX<CacheDataRow> initPred)` Insert rows into page memory.
`void` `invoke(GridCacheContext cctx, KeyCacheObject key, IgniteCacheOffheapManager.OffheapInvokeClosure c)`
`boolean` `isEmpty()`
`void` `markDestroyed()` Mark store as destroyed.
`GridCursor<CacheDataRow>` `mvccAllVersionsCursor(GridCacheContext cctx, KeyCacheObject key, Object x)` Returns iterator over the all row versions for the given key.
`boolean` `mvccApplyHistoryIfAbsent(GridCacheContext cctx, KeyCacheObject key, List<GridCacheMvccEntryInfo> hist)` Tries to apply entry history.
`void` `mvccApplyUpdate(GridCacheContext cctx, KeyCacheObject key, CacheObject val, GridCacheVersion ver, long expireTime, MvccVersion mvccVer)`
`CacheDataRow` `mvccFind(GridCacheContext cctx, KeyCacheObject key, MvccSnapshot snapshot)`
`List<IgniteBiTuple<Object,MvccVersion>>` `mvccFindAllVersions(GridCacheContext cctx, KeyCacheObject key)` For testing only.
`boolean` `mvccInitialValue(GridCacheContext cctx, KeyCacheObject key, @Nullable CacheObject val, GridCacheVersion ver, long expireTime, MvccVersion mvccVer, MvccVersion newMvccVer)`
`MvccUpdateResult` `mvccLock(GridCacheContext cctx, KeyCacheObject key, MvccSnapshot mvccSnapshot)`
`MvccUpdateResult` `mvccRemove(GridCacheContext cctx, KeyCacheObject key, MvccSnapshot mvccSnapshot, @Nullable CacheEntryPredicate filter, boolean primary, boolean needHistory, boolean needOldVal, boolean retVal)`
`void` `mvccRemoveAll(GridCacheContext cctx, KeyCacheObject key)`
`MvccUpdateResult` `mvccUpdate(GridCacheContext cctx, KeyCacheObject key, CacheObject val, GridCacheVersion ver, long expireTime, MvccSnapshot mvccSnapshot, @Nullable CacheEntryPredicate filter, javax.cache.processor.EntryProcessor entryProc, Object[] invokeArgs, boolean primary, boolean needHistory, boolean noCreate, boolean needOldVal, boolean retVal, boolean keepBinary)`
`boolean` `mvccUpdateRowWithPreloadInfo(GridCacheContext cctx, KeyCacheObject key, @Nullable CacheObject val, GridCacheVersion ver, long expireTime, MvccVersion mvccVer, MvccVersion newMvccVer, byte mvccTxState, byte newMvccTxState)` Apply update with full history.
`long` `nextUpdateCounter()`
`int` `partId()`
`PartitionMetaStorage<SimpleDataRow>` `partStorage()` Partition storage.
`PartitionUpdateCounter` `partUpdateCounter()`
`PendingEntriesTree` `pendingTree()` Return PendingTree for data store.
`void` `preload()` Preload a store into page memory.
`void` `remove(GridCacheContext cctx, KeyCacheObject key, int partId)`
`long` `reserve(long delta)`
`long` `reservedCounter()`
`void` `resetInitialUpdateCounter()` Reset the initial value of the partition counter.
`void` `resetUpdateCounter()` Reset counter for partition.
`void` `restoreState(long size, long updCntr, @Nullable Map<Integer,Long> cacheSizes, byte[] cntrUpdData)`
`RowStore` `rowStore()`
`void` `setRowCacheCleaner(GridQueryRowCacheCleaner rowCacheCleaner)` Inject rows cache cleaner.
`CacheDataTree` `tree()`
`void` `update(GridCacheContext cctx, KeyCacheObject key, CacheObject val, GridCacheVersion ver, long expireTime, @Nullable CacheDataRow oldRow)`
`long` `updateCounter()`
`void` `updateCounter(long val)`
`boolean` `updateCounter(long start, long delta)` Updates counters from start value by delta value.
`void` `updateInitialCounter(long start, long delta)`
`void` `updateSize(int cacheId, long delta)` Updates size metric for particular cache.
`void` `updateTxState(GridCacheContext cctx, CacheSearchRow row)`

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

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

### Field Detail

#### pCntr

    protected final PartitionUpdateCounter pCntr

Update counter.

### Constructor Detail

#### CacheDataStoreImpl

    public CacheDataStoreImpl(int partId,
                              CacheDataRowStore rowStore,
                              CacheDataTree dataTree,
                              Supplier<PendingEntriesTree> pendingEntries,
                              CacheGroupContext grp,
                              GridSpinBusyLock busyLock,
                              IgniteLogger log,
                              @Nullable
                              @Nullable Supplier<GridQueryRowCacheCleaner> cleaner)

Parameters:
  `partId` - Partition number.
  `rowStore` - Row store.
  `dataTree` - Data tree.

### Method Detail

#### tree

    public CacheDataTree tree()

Specified by:
  `tree` in interface `IgniteCacheOffheapManager.CacheDataStore`
Returns:
  Cache data tree object.

#### init

    public boolean init()

Initialize data store if it exists.

Specified by:
  `init` in interface `IgniteCacheOffheapManager.CacheDataStore`
Returns:
  `True` if initialized.

#### partId

    public int partId()

Specified by:
  `partId` in interface `IgniteCacheOffheapManager.CacheDataStore`
Returns:
  Partition ID.

#### cacheSize

    public long cacheSize(int cacheId)

Specified by:
  `cacheSize` in interface `IgniteCacheOffheapManager.CacheDataStore`
Parameters:
  `cacheId` - Cache ID.
Returns:
  Size.

#### cacheSizes

    public Map<Integer,Long> cacheSizes()

Specified by:
  `cacheSizes` in interface `IgniteCacheOffheapManager.CacheDataStore`
Returns:
  Cache sizes if store belongs to group containing multiple caches.

#### fullSize

    public long fullSize()

Specified by:
  `fullSize` in interface `IgniteCacheOffheapManager.CacheDataStore`
Returns:
  Total size.

#### isEmpty

    public boolean isEmpty()

Specified by:
  `isEmpty` in interface `IgniteCacheOffheapManager.CacheDataStore`
Returns:
  `True` if there are no items in the store.

#### updateSize

    public void updateSize(int cacheId,
                           long delta)

Updates size metric for particular cache.

Specified by:
  `updateSize` in interface `IgniteCacheOffheapManager.CacheDataStore`
Parameters:
  `cacheId` - Cache ID.
  `delta` - Size delta.

#### nextUpdateCounter

    public long nextUpdateCounter()

Specified by:
  `nextUpdateCounter` in interface `IgniteCacheOffheapManager.CacheDataStore`
Returns:
  Next update counter.

#### initialUpdateCounter

    public long initialUpdateCounter()

Specified by:
  `initialUpdateCounter` in interface `IgniteCacheOffheapManager.CacheDataStore`
Returns:
  Initial update counter.

#### updateInitialCounter

    public void updateInitialCounter(long start,
                                     long delta)

Specified by:
  `updateInitialCounter` in interface `IgniteCacheOffheapManager.CacheDataStore`
Parameters:
  `start` - Start.
  `delta` - Delta.

#### getAndIncrementUpdateCounter

    public long getAndIncrementUpdateCounter(long delta)

Returns current value and updates counter by delta.

Specified by:
  `getAndIncrementUpdateCounter` in interface `IgniteCacheOffheapManager.CacheDataStore`
Parameters:
  `delta` - Delta.
Returns:
  Current value.

#### updateCounter

    public long updateCounter()

Specified by:
  `updateCounter` in interface `IgniteCacheOffheapManager.CacheDataStore`
Returns:
  Update counter (LWM).

#### reservedCounter

    public long reservedCounter()

Specified by:
  `reservedCounter` in interface `IgniteCacheOffheapManager.CacheDataStore`
Returns:
  Reserved counter (HWM).

#### partUpdateCounter

    public PartitionUpdateCounter partUpdateCounter()

Specified by:
  `partUpdateCounter` in interface `IgniteCacheOffheapManager.CacheDataStore`
Returns:
  Update counter or `null` if store is not yet created.

#### reserve

    public long reserve(long delta)

Specified by:
  `reserve` in interface `IgniteCacheOffheapManager.CacheDataStore`
Parameters:
  `delta` - Delta.

#### updateCounter

    public void updateCounter(long val)

Specified by:
  `updateCounter` in interface `IgniteCacheOffheapManager.CacheDataStore`
Parameters:
  `val` - Update counter.

#### updateCounter

    public boolean updateCounter(long start,
                                 long delta)

Updates counters from start value by delta value.

Specified by:
  `updateCounter` in interface `IgniteCacheOffheapManager.CacheDataStore`
Parameters:
  `start` - Start.
  `delta` - Delta.

#### finalizeUpdateCounters

    public GridLongList finalizeUpdateCounters()

Flushes pending update counters closing all possible gaps.

Specified by:
  `finalizeUpdateCounters` in interface `IgniteCacheOffheapManager.CacheDataStore`
Returns:
  Even-length array of pairs [start, end] for each gap.

#### invoke

    public void invoke(GridCacheContext cctx,
                       KeyCacheObject key,
                       IgniteCacheOffheapManager.OffheapInvokeClosure c)
                throws IgniteCheckedException

Specified by:
  `invoke` in interface `IgniteCacheOffheapManager.CacheDataStore`
Parameters:
  `cctx` - Cache context.
  `key` - Key.
  `c` - Closure.
Throws:
  `IgniteCheckedException` - If failed.

#### createRow

    public CacheDataRow createRow(GridCacheContext cctx,
                                  KeyCacheObject key,
                                  CacheObject val,
                                  GridCacheVersion ver,
                                  long expireTime,
                                  @Nullable
                                  @Nullable CacheDataRow oldRow)
                           throws IgniteCheckedException

Specified by:
  `createRow` in interface `IgniteCacheOffheapManager.CacheDataStore`
Parameters:
  `cctx` - Cache context.
  `key` - Key.
  `val` - Value.
  `ver` - Version.
  `expireTime` - Expire time.
  `oldRow` - Old row.
Returns:
  New row.
Throws:
  `IgniteCheckedException` - If failed.

#### insertRows

    public void insertRows(Collection<DataRowCacheAware> rows,
                           IgnitePredicateX<CacheDataRow> initPred)
                    throws IgniteCheckedException

Insert rows into page memory.

Specified by:
  `insertRows` in interface `IgniteCacheOffheapManager.CacheDataStore`
Parameters:
  `rows` - Rows.
  `initPred` - Applied to all rows. Each row that not matches the predicate is removed.
Throws:
  `IgniteCheckedException` - If failed.

#### mvccInitialValue

    public boolean mvccInitialValue(GridCacheContext cctx,
                                    KeyCacheObject key,
                                    @Nullable
                                    @Nullable CacheObject val,
                                    GridCacheVersion ver,
                                    long expireTime,
                                    MvccVersion mvccVer,
                                    MvccVersion newMvccVer)
                             throws IgniteCheckedException

Specified by:
  `mvccInitialValue` in interface `IgniteCacheOffheapManager.CacheDataStore`
Parameters:
  `cctx` - Cache context.
  `key` - Key.
  `val` - Value.
  `ver` - Version.
  `mvccVer` - MVCC version.
  `newMvccVer` - New MVCC version.
Returns:
  `True` if new value was inserted.
Throws:
  `IgniteCheckedException` - If failed.

#### mvccApplyHistoryIfAbsent

    public boolean mvccApplyHistoryIfAbsent(GridCacheContext cctx,
                                            KeyCacheObject key,
                                            List<GridCacheMvccEntryInfo> hist)
                                     throws IgniteCheckedException

Tries to apply entry history. Either applies full entry history or do nothing.

Specified by:
  `mvccApplyHistoryIfAbsent` in interface `IgniteCacheOffheapManager.CacheDataStore`
Parameters:
  `cctx` - Cache context.
  `key` - Key.
  `hist` - Full entry history.
Returns:
  `True` if entry history applied successfully, `False` otherwise.
Throws:
  `IgniteCheckedException`

#### mvccUpdateRowWithPreloadInfo

    public boolean mvccUpdateRowWithPreloadInfo(GridCacheContext cctx,
                                                KeyCacheObject key,
                                                @Nullable
                                                @Nullable CacheObject val,
                                                GridCacheVersion ver,
                                                long expireTime,
                                                MvccVersion mvccVer,
                                                MvccVersion newMvccVer,
                                                byte mvccTxState,
                                                byte newMvccTxState)
                                         throws IgniteCheckedException

Apply update with full history. Note: History version may be skipped if it have already been actualized with previous update operation.

Specified by:
  `mvccUpdateRowWithPreloadInfo` in interface `IgniteCacheOffheapManager.CacheDataStore`
Parameters:
  `cctx` - Grid cache context.
  `key` - Key.
  `val` - Value.
  `ver` - Version.
  `expireTime` - Expiration time.
  `mvccVer` - Mvcc version.
  `newMvccVer` - New mvcc version.
Returns:
  `true` on success.
Throws:
  `IgniteCheckedException`

#### mvccUpdate

    public MvccUpdateResult mvccUpdate(GridCacheContext cctx,
                                       KeyCacheObject key,
                                       CacheObject val,
                                       GridCacheVersion ver,
                                       long expireTime,
                                       MvccSnapshot mvccSnapshot,
                                       @Nullable
                                       @Nullable CacheEntryPredicate filter,
                                       javax.cache.processor.EntryProcessor entryProc,
                                       Object[] invokeArgs,
                                       boolean primary,
                                       boolean needHistory,
                                       boolean noCreate,
                                       boolean needOldVal,
                                       boolean retVal,
                                       boolean keepBinary)
                                throws IgniteCheckedException

Specified by:
  `mvccUpdate` in interface `IgniteCacheOffheapManager.CacheDataStore`
Parameters:
  `cctx` - Cache context.
  `key` - Key.
  `val` - Value.
  `ver` - Version.
  `expireTime` - Expire time.
  `mvccSnapshot` - MVCC snapshot.
  `filter` - Filter.
  `entryProc` - Entry processor.
  `invokeArgs` - Entry processor invoke arguments.
  `primary` - `True` if update is executed on primary node.
  `needHistory` - Flag to collect history.
  `noCreate` - Flag indicating that row should not be created if absent.
  `needOldVal` - `True` if need old value.
  `retVal` - Flag to return previous value.
  `keepBinary` - Keep binary flag.
Returns:
  Update result.
Throws:
  `IgniteCheckedException` - If failed.

#### mvccRemove

    public MvccUpdateResult mvccRemove(GridCacheContext cctx,
                                       KeyCacheObject key,
                                       MvccSnapshot mvccSnapshot,
                                       @Nullable
                                       @Nullable CacheEntryPredicate filter,
                                       boolean primary,
                                       boolean needHistory,
                                       boolean needOldVal,
                                       boolean retVal)
                                throws IgniteCheckedException

Specified by:
  `mvccRemove` in interface `IgniteCacheOffheapManager.CacheDataStore`
Parameters:
  `cctx` - Cache context.
  `key` - Key.
  `mvccSnapshot` - MVCC snapshot.
  `filter` - Filter.
  `primary` - `True` if update is executed on primary node.
  `needHistory` - Flag to collect history.
  `needOldVal` - `True` if need old value.
  `retVal` - Flag to return previous value.
Returns:
  List of transactions to wait for.
Throws:
  `IgniteCheckedException` - If failed.

#### mvccLock

    public MvccUpdateResult mvccLock(GridCacheContext cctx,
                                     KeyCacheObject key,
                                     MvccSnapshot mvccSnapshot)
                              throws IgniteCheckedException

Specified by:
  `mvccLock` in interface `IgniteCacheOffheapManager.CacheDataStore`
Parameters:
  `cctx` - Cache context.
  `key` - Key.
  `mvccSnapshot` - MVCC snapshot.
Returns:
  List of transactions to wait for.
Throws:
  `IgniteCheckedException` - If failed.

#### mvccRemoveAll

    public void mvccRemoveAll(GridCacheContext cctx,
                              KeyCacheObject key)
                       throws IgniteCheckedException

Specified by:
  `mvccRemoveAll` in interface `IgniteCacheOffheapManager.CacheDataStore`
Parameters:
  `cctx` - Cache context.
  `key` - Key.
Throws:
  `IgniteCheckedException` - If failed.

#### cleanup

    public int cleanup(GridCacheContext cctx,
                       @Nullable
                       @Nullable List<MvccLinkAwareSearchRow> cleanupRows)
                throws IgniteCheckedException

Specified by:
  `cleanup` in interface `IgniteCacheOffheapManager.CacheDataStore`
Parameters:
  `cctx` - Cache context.
  `cleanupRows` - Rows to cleanup.
Returns:
  Cleaned rows count.
Throws:
  `IgniteCheckedException` - If failed.

#### updateTxState

    public void updateTxState(GridCacheContext cctx,
                              CacheSearchRow row)
                       throws IgniteCheckedException

Specified by:
  `updateTxState` in interface `IgniteCacheOffheapManager.CacheDataStore`
Parameters:
  `cctx` - Cache context.
  `row` - Row.
Throws:
  `IgniteCheckedException`

#### update

    public void update(GridCacheContext cctx,
                       KeyCacheObject key,
                       CacheObject val,
                       GridCacheVersion ver,
                       long expireTime,
                       @Nullable
                       @Nullable CacheDataRow oldRow)
                throws IgniteCheckedException

Specified by:
  `update` in interface `IgniteCacheOffheapManager.CacheDataStore`
Parameters:
  `cctx` - Cache context.
  `key` - Key.
  `val` - Value.
  `ver` - Version.
  `expireTime` - Expire time.
  `oldRow` - Old row if available.
Throws:
  `IgniteCheckedException` - If failed.

#### mvccApplyUpdate

    public void mvccApplyUpdate(GridCacheContext cctx,
                                KeyCacheObject key,
                                CacheObject val,
                                GridCacheVersion ver,
                                long expireTime,
                                MvccVersion mvccVer)
                         throws IgniteCheckedException

Specified by:
  `mvccApplyUpdate` in interface `IgniteCacheOffheapManager.CacheDataStore`
Parameters:
  `cctx` - Cache context.
  `key` - Key.
  `val` - Value.
  `ver` - Version.
  `expireTime` - Expire time.
  `mvccVer` - Mvcc version.
Throws:
  `IgniteCheckedException`

#### remove

    public void remove(GridCacheContext cctx,
                       KeyCacheObject key,
                       int partId)
                throws IgniteCheckedException

Specified by:
  `remove` in interface `IgniteCacheOffheapManager.CacheDataStore`
Parameters:
  `cctx` - Cache context.
  `key` - Key.
  `partId` - Partition number.
Throws:
  `IgniteCheckedException` - If failed.

#### find

    public CacheDataRow find(GridCacheContext cctx,
                             KeyCacheObject key)
                      throws IgniteCheckedException

Specified by:
  `find` in interface `IgniteCacheOffheapManager.CacheDataStore`
Parameters:
  `cctx` - Cache context.
  `key` - Key.
Returns:
  Data row.
Throws:
  `IgniteCheckedException` - If failed.

#### mvccFindAllVersions

    public List<IgniteBiTuple<Object,MvccVersion>> mvccFindAllVersions(GridCacheContext cctx,
                                                                       KeyCacheObject key)
                                                                throws IgniteCheckedException

For testing only.

Specified by:
  `mvccFindAllVersions` in interface `IgniteCacheOffheapManager.CacheDataStore`
Parameters:
  `cctx` - Cache context.
  `key` - Key.
Returns:
  All stored versions for given key.
Throws:
  `IgniteCheckedException` - If failed.

#### mvccAllVersionsCursor

    public GridCursor<CacheDataRow> mvccAllVersionsCursor(GridCacheContext cctx,
                                                          KeyCacheObject key,
                                                          Object x)
                                                   throws IgniteCheckedException

Returns iterator over the all row versions for the given key.

Specified by:
  `mvccAllVersionsCursor` in interface `IgniteCacheOffheapManager.CacheDataStore`
Parameters:
  `cctx` - Cache context.
  `key` - Key.
  `x` - Implementation specific argument, `null` always means that we need to return full detached data row.
Returns:
  Iterator over all versions.
Throws:
  `IgniteCheckedException` - If failed.

#### mvccFind

    public CacheDataRow mvccFind(GridCacheContext cctx,
                                 KeyCacheObject key,
                                 MvccSnapshot snapshot)
                          throws IgniteCheckedException

Specified by:
  `mvccFind` in interface `IgniteCacheOffheapManager.CacheDataStore`
Parameters:
  `cctx` - Cache context.
  `key` - Key.
Returns:
  Data row.
Throws:
  `IgniteCheckedException` - If failed.

#### cursor

    public GridCursor<? extends CacheDataRow> cursor()
                                              throws IgniteCheckedException

Specified by:
  `cursor` in interface `IgniteCacheOffheapManager.CacheDataStore`
Returns:
  Data cursor.
Throws:
  `IgniteCheckedException` - If failed.

#### cursor

    public GridCursor<? extends CacheDataRow> cursor(Object x)
                                              throws IgniteCheckedException

Specified by:
  `cursor` in interface `IgniteCacheOffheapManager.CacheDataStore`
Parameters:
  `x` - Implementation specific argument, `null` always means that we need to return full detached data row.
Returns:
  Data cursor.
Throws:
  `IgniteCheckedException` - If failed.

#### cursor

    public GridCursor<? extends CacheDataRow> cursor(MvccSnapshot mvccSnapshot)
                                              throws IgniteCheckedException

Specified by:
  `cursor` in interface `IgniteCacheOffheapManager.CacheDataStore`
Parameters:
  `mvccSnapshot` - MVCC snapshot.
Returns:
  Data cursor.
Throws:
  `IgniteCheckedException` - If failed.

#### cursor

    public GridCursor<? extends CacheDataRow> cursor(int cacheId)
                                              throws IgniteCheckedException

Specified by:
  `cursor` in interface `IgniteCacheOffheapManager.CacheDataStore`
Parameters:
  `cacheId` - Cache ID.
Returns:
  Data cursor.
Throws:
  `IgniteCheckedException` - If failed.

#### cursor

    public GridCursor<? extends CacheDataRow> cursor(int cacheId,
                                                     MvccSnapshot mvccSnapshot)
                                              throws IgniteCheckedException

Specified by:
  `cursor` in interface `IgniteCacheOffheapManager.CacheDataStore`
Parameters:
  `cacheId` - Cache ID.
  `mvccSnapshot` - Mvcc snapshot.
Returns:
  Data cursor.
Throws:
  `IgniteCheckedException` - If failed.

#### cursor

    public GridCursor<? extends CacheDataRow> cursor(int cacheId,
                                                     KeyCacheObject lower,
                                                     KeyCacheObject upper)
                                              throws IgniteCheckedException

Specified by:
  `cursor` in interface `IgniteCacheOffheapManager.CacheDataStore`
Parameters:
  `cacheId` - Cache ID.
  `lower` - Lower bound.
  `upper` - Upper bound.
Returns:
  Data cursor.
Throws:
  `IgniteCheckedException` - If failed.

#### cursor

    public GridCursor<? extends CacheDataRow> cursor(int cacheId,
                                                     KeyCacheObject lower,
                                                     KeyCacheObject upper,
                                                     Object x)
                                              throws IgniteCheckedException

Specified by:
  `cursor` in interface `IgniteCacheOffheapManager.CacheDataStore`
Parameters:
  `cacheId` - Cache ID.
  `lower` - Lower bound.
  `upper` - Upper bound.
  `x` - Implementation specific argument, `null` always means that we need to return full detached data row.
Returns:
  Data cursor.
Throws:
  `IgniteCheckedException` - If failed.

#### cursor

    public GridCursor<? extends CacheDataRow> cursor(int cacheId,
                                                     KeyCacheObject lower,
                                                     KeyCacheObject upper,
                                                     Object x,
                                                     MvccSnapshot snapshot)
                                              throws IgniteCheckedException

Specified by:
  `cursor` in interface `IgniteCacheOffheapManager.CacheDataStore`
Parameters:
  `cacheId` - Cache ID.
  `lower` - Lower bound.
  `upper` - Upper bound.
  `x` - Implementation specific argument, `null` always means that we need to return full detached data row.
  `snapshot` - Mvcc snapshot.
Returns:
  Data cursor.
Throws:
  `IgniteCheckedException` - If failed.

#### destroy

    public void destroy()
                 throws IgniteCheckedException

Destroys the tree associated with the store.

Specified by:
  `destroy` in interface `IgniteCacheOffheapManager.CacheDataStore`
Throws:
  `IgniteCheckedException` - If failed.

#### markDestroyed

    public void markDestroyed()

Mark store as destroyed.

Specified by:
  `markDestroyed` in interface `IgniteCacheOffheapManager.CacheDataStore`

#### destroyed

    public boolean destroyed()

Specified by:
  `destroyed` in interface `IgniteCacheOffheapManager.CacheDataStore`
Returns:
  `true` If marked as destroyed.

#### clear

    public void clear(int cacheId)
               throws IgniteCheckedException

Clears all the records associated with logical cache with given ID.

Specified by:
  `clear` in interface `IgniteCacheOffheapManager.CacheDataStore`
Parameters:
  `cacheId` - Cache ID.
Throws:
  `IgniteCheckedException` - If failed.

#### rowStore

    public RowStore rowStore()

Specified by:
  `rowStore` in interface `IgniteCacheOffheapManager.CacheDataStore`
Returns:
  Row store.

#### setRowCacheCleaner

    public void setRowCacheCleaner(GridQueryRowCacheCleaner rowCacheCleaner)

Inject rows cache cleaner.

Specified by:
  `setRowCacheCleaner` in interface `IgniteCacheOffheapManager.CacheDataStore`
Parameters:
  `rowCacheCleaner` - Rows cache cleaner.

#### restoreState

    public void restoreState(long size,
                             long updCntr,
                             @Nullable
                             @Nullable Map<Integer,Long> cacheSizes,
                             byte[] cntrUpdData)

Parameters:
  `size` - Size to init.
  `updCntr` - Update counter.
  `cacheSizes` - Cache sizes if store belongs to group containing multiple caches.
  `cntrUpdData` - Counter updates.

#### pendingTree

    public PendingEntriesTree pendingTree()

Return PendingTree for data store.

Specified by:
  `pendingTree` in interface `IgniteCacheOffheapManager.CacheDataStore`
Returns:
  PendingTree instance.

#### preload

    public void preload()
                 throws IgniteCheckedException

Preload a store into page memory.

Specified by:
  `preload` in interface `IgniteCacheOffheapManager.CacheDataStore`
Throws:
  `IgniteCheckedException` - If failed.

#### resetUpdateCounter

    public void resetUpdateCounter()

Reset counter for partition.

Specified by:
  `resetUpdateCounter` in interface `IgniteCacheOffheapManager.CacheDataStore`

#### resetInitialUpdateCounter

    public void resetInitialUpdateCounter()

Reset the initial value of the partition counter.

Specified by:
  `resetInitialUpdateCounter` in interface `IgniteCacheOffheapManager.CacheDataStore`

#### partStorage

    public PartitionMetaStorage<SimpleDataRow> partStorage()

Partition storage.

Specified by:
  `partStorage` in interface `IgniteCacheOffheapManager.CacheDataStore`

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.14.0
Release Date | : September 29 2022