public class GridCacheOffheapManager.GridCacheDataStore extends Object implements IgniteCacheOffheapManager.CacheDataStore
| Modifier and Type | Method and Description |
|---|---|
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 mvccSnapshot) |
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.
|
long |
expiredSize()
Gets the number of entries pending expire.
|
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 mvccVer,
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 mvccVer,
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 |
partStorage()
Partition storage.
|
PartitionUpdateCounter |
partUpdateCounter() |
PendingEntriesTree |
pendingTree()
Return PendingTree for data store.
|
void |
preload()
Preload a store into page memory.
|
int |
purgeExpired(GridCacheContext cctx,
IgniteInClosure2X<GridCacheEntryEx,GridCacheVersion> c,
int amount)
Try to remove expired entries from data store.
|
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.
|
RowStore |
rowStore() |
void |
setRowCacheCleaner(GridQueryRowCacheCleaner rowCacheCleaner)
Inject rows cache cleaner.
|
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) |
public boolean init()
init in interface IgniteCacheOffheapManager.CacheDataStoreTrue if initialized.public int partId()
partId in interface IgniteCacheOffheapManager.CacheDataStorepublic RowStore rowStore()
rowStore in interface IgniteCacheOffheapManager.CacheDataStorepublic long fullSize()
fullSize in interface IgniteCacheOffheapManager.CacheDataStorepublic boolean isEmpty()
isEmpty in interface IgniteCacheOffheapManager.CacheDataStoreTrue if there are no items in the store.public long cacheSize(int cacheId)
cacheSize in interface IgniteCacheOffheapManager.CacheDataStorecacheId - Cache ID.public Map<Integer,Long> cacheSizes()
cacheSizes in interface IgniteCacheOffheapManager.CacheDataStorepublic void updateSize(int cacheId,
long delta)
updateSize in interface IgniteCacheOffheapManager.CacheDataStorecacheId - Cache ID.delta - Size delta.public long updateCounter()
updateCounter in interface IgniteCacheOffheapManager.CacheDataStorepublic long reservedCounter()
reservedCounter in interface IgniteCacheOffheapManager.CacheDataStorepublic PartitionUpdateCounter partUpdateCounter()
partUpdateCounter in interface IgniteCacheOffheapManager.CacheDataStorenull if store is not yet created.public long getAndIncrementUpdateCounter(long delta)
getAndIncrementUpdateCounter in interface IgniteCacheOffheapManager.CacheDataStoredelta - Delta.public long reserve(long delta)
reserve in interface IgniteCacheOffheapManager.CacheDataStoredelta - Delta.public void updateCounter(long val)
updateCounter in interface IgniteCacheOffheapManager.CacheDataStoreval - Update counter.public boolean updateCounter(long start,
long delta)
updateCounter in interface IgniteCacheOffheapManager.CacheDataStorestart - Start.delta - Delta.public GridLongList finalizeUpdateCounters()
finalizeUpdateCounters in interface IgniteCacheOffheapManager.CacheDataStorepublic long nextUpdateCounter()
nextUpdateCounter in interface IgniteCacheOffheapManager.CacheDataStorepublic long initialUpdateCounter()
initialUpdateCounter in interface IgniteCacheOffheapManager.CacheDataStorepublic void updateInitialCounter(long start,
long delta)
updateInitialCounter in interface IgniteCacheOffheapManager.CacheDataStorestart - Counter.delta - Delta.public void setRowCacheCleaner(GridQueryRowCacheCleaner rowCacheCleaner)
setRowCacheCleaner in interface IgniteCacheOffheapManager.CacheDataStorerowCacheCleaner - Rows cache cleaner.public void update(GridCacheContext cctx, KeyCacheObject key, CacheObject val, GridCacheVersion ver, long expireTime, @Nullable @Nullable CacheDataRow oldRow) throws IgniteCheckedException
update in interface IgniteCacheOffheapManager.CacheDataStorecctx - Cache context.key - Key.val - Value.ver - Version.expireTime - Expire time.oldRow - Old row if available.IgniteCheckedException - If failed.public boolean mvccInitialValue(GridCacheContext cctx, KeyCacheObject key, @Nullable @Nullable CacheObject val, GridCacheVersion ver, long expireTime, MvccVersion mvccVer, MvccVersion newMvccVer) throws IgniteCheckedException
mvccInitialValue in interface IgniteCacheOffheapManager.CacheDataStorecctx - Cache context.key - Key.val - Value.ver - Version.mvccVer - MVCC version.newMvccVer - New MVCC version.True if new value was inserted.IgniteCheckedException - If failed.public boolean mvccApplyHistoryIfAbsent(GridCacheContext cctx, KeyCacheObject key, List<GridCacheMvccEntryInfo> hist) throws IgniteCheckedException
mvccApplyHistoryIfAbsent in interface IgniteCacheOffheapManager.CacheDataStorecctx - Cache context.key - Key.hist - Full entry history.True if entry history applied successfully, False otherwise.IgniteCheckedExceptionpublic boolean mvccUpdateRowWithPreloadInfo(GridCacheContext cctx, KeyCacheObject key, @Nullable @Nullable CacheObject val, GridCacheVersion ver, long expireTime, MvccVersion mvccVer, MvccVersion newMvccVer, byte mvccTxState, byte newMvccTxState) throws IgniteCheckedException
mvccUpdateRowWithPreloadInfo in interface IgniteCacheOffheapManager.CacheDataStorecctx - Grid cache context.key - Key.val - Value.ver - Version.expireTime - Expiration time.mvccVer - Mvcc version.newMvccVer - New mvcc version.true on success.IgniteCheckedExceptionpublic MvccUpdateResult mvccUpdate(GridCacheContext cctx, KeyCacheObject key, CacheObject val, GridCacheVersion ver, long expireTime, MvccSnapshot mvccVer, CacheEntryPredicate filter, javax.cache.processor.EntryProcessor entryProc, Object[] invokeArgs, boolean primary, boolean needHistory, boolean noCreate, boolean needOldVal, boolean retVal, boolean keepBinary) throws IgniteCheckedException
mvccUpdate in interface IgniteCacheOffheapManager.CacheDataStorecctx - Cache context.key - Key.val - Value.ver - Version.expireTime - Expire time.mvccVer - 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.IgniteCheckedException - If failed.public MvccUpdateResult mvccRemove(GridCacheContext cctx, KeyCacheObject key, MvccSnapshot mvccVer, CacheEntryPredicate filter, boolean primary, boolean needHistory, boolean needOldVal, boolean retVal) throws IgniteCheckedException
mvccRemove in interface IgniteCacheOffheapManager.CacheDataStorecctx - Cache context.key - Key.mvccVer - 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.IgniteCheckedException - If failed.public MvccUpdateResult mvccLock(GridCacheContext cctx, KeyCacheObject key, MvccSnapshot mvccSnapshot) throws IgniteCheckedException
mvccLock in interface IgniteCacheOffheapManager.CacheDataStorecctx - Cache context.key - Key.mvccSnapshot - MVCC snapshot.IgniteCheckedException - If failed.public void mvccRemoveAll(GridCacheContext cctx, KeyCacheObject key) throws IgniteCheckedException
mvccRemoveAll in interface IgniteCacheOffheapManager.CacheDataStorecctx - Cache context.key - Key.IgniteCheckedException - If failed.public void mvccApplyUpdate(GridCacheContext cctx, KeyCacheObject key, CacheObject val, GridCacheVersion ver, long expireTime, MvccVersion mvccVer) throws IgniteCheckedException
mvccApplyUpdate in interface IgniteCacheOffheapManager.CacheDataStorecctx - Cache context.key - Key.val - Value.ver - Version.expireTime - Expire time.mvccVer - Mvcc version.IgniteCheckedExceptionpublic CacheDataRow createRow(GridCacheContext cctx, KeyCacheObject key, CacheObject val, GridCacheVersion ver, long expireTime, @Nullable @Nullable CacheDataRow oldRow) throws IgniteCheckedException
createRow in interface IgniteCacheOffheapManager.CacheDataStorecctx - Cache context.key - Key.val - Value.ver - Version.expireTime - Expire time.oldRow - Old row.IgniteCheckedException - If failed.public void insertRows(Collection<DataRowCacheAware> rows, IgnitePredicateX<CacheDataRow> initPred) throws IgniteCheckedException
insertRows in interface IgniteCacheOffheapManager.CacheDataStorerows - Rows.initPred - Applied to all rows. Each row that not matches the predicate is removed.IgniteCheckedException - If failed.public int cleanup(GridCacheContext cctx, @Nullable @Nullable List<MvccLinkAwareSearchRow> cleanupRows) throws IgniteCheckedException
cleanup in interface IgniteCacheOffheapManager.CacheDataStorecctx - Cache context.cleanupRows - Rows to cleanup.IgniteCheckedException - If failed.public void updateTxState(GridCacheContext cctx, CacheSearchRow row) throws IgniteCheckedException
updateTxState in interface IgniteCacheOffheapManager.CacheDataStorecctx - Cache context.row - Row.IgniteCheckedExceptionpublic void invoke(GridCacheContext cctx, KeyCacheObject key, IgniteCacheOffheapManager.OffheapInvokeClosure c) throws IgniteCheckedException
invoke in interface IgniteCacheOffheapManager.CacheDataStorecctx - Cache context.key - Key.c - Closure.IgniteCheckedException - If failed.public void remove(GridCacheContext cctx, KeyCacheObject key, int partId) throws IgniteCheckedException
remove in interface IgniteCacheOffheapManager.CacheDataStorecctx - Cache context.key - Key.partId - Partition number.IgniteCheckedException - If failed.public CacheDataRow find(GridCacheContext cctx, KeyCacheObject key) throws IgniteCheckedException
find in interface IgniteCacheOffheapManager.CacheDataStorecctx - Cache context.key - Key.IgniteCheckedException - If failed.public CacheDataRow mvccFind(GridCacheContext cctx, KeyCacheObject key, MvccSnapshot snapshot) throws IgniteCheckedException
mvccFind in interface IgniteCacheOffheapManager.CacheDataStorecctx - Cache context.key - Key.IgniteCheckedException - If failed.public List<IgniteBiTuple<Object,MvccVersion>> mvccFindAllVersions(GridCacheContext cctx, KeyCacheObject key) throws IgniteCheckedException
mvccFindAllVersions in interface IgniteCacheOffheapManager.CacheDataStorecctx - Cache context.key - Key.IgniteCheckedException - If failed.public GridCursor<CacheDataRow> mvccAllVersionsCursor(GridCacheContext cctx, KeyCacheObject key, Object x) throws IgniteCheckedException
mvccAllVersionsCursor in interface IgniteCacheOffheapManager.CacheDataStorecctx - Cache context.key - Key.x - Implementation specific argument, null always means that we need to return full detached data row.IgniteCheckedException - If failed.public GridCursor<? extends CacheDataRow> cursor() throws IgniteCheckedException
cursor in interface IgniteCacheOffheapManager.CacheDataStoreIgniteCheckedException - If failed.public GridCursor<? extends CacheDataRow> cursor(Object x) throws IgniteCheckedException
cursor in interface IgniteCacheOffheapManager.CacheDataStorex - Implementation specific argument, null always means that we need to return full detached data row.IgniteCheckedException - If failed.public GridCursor<? extends CacheDataRow> cursor(MvccSnapshot mvccSnapshot) throws IgniteCheckedException
cursor in interface IgniteCacheOffheapManager.CacheDataStoremvccSnapshot - MVCC snapshot.IgniteCheckedException - If failed.public GridCursor<? extends CacheDataRow> cursor(int cacheId, KeyCacheObject lower, KeyCacheObject upper) throws IgniteCheckedException
cursor in interface IgniteCacheOffheapManager.CacheDataStorecacheId - Cache ID.lower - Lower bound.upper - Upper bound.IgniteCheckedException - If failed.public GridCursor<? extends CacheDataRow> cursor(int cacheId, KeyCacheObject lower, KeyCacheObject upper, Object x) throws IgniteCheckedException
cursor in interface IgniteCacheOffheapManager.CacheDataStorecacheId - Cache ID.lower - Lower bound.upper - Upper bound.x - Implementation specific argument, null always means that we need to return full detached data row.IgniteCheckedException - If failed.public GridCursor<? extends CacheDataRow> cursor(int cacheId, KeyCacheObject lower, KeyCacheObject upper, Object x, MvccSnapshot mvccSnapshot) throws IgniteCheckedException
cursor in interface IgniteCacheOffheapManager.CacheDataStorecacheId - Cache ID.lower - Lower bound.upper - Upper bound.x - Implementation specific argument, null always means that we need to return full detached data row.mvccSnapshot - Mvcc snapshot.IgniteCheckedException - If failed.public void destroy()
throws IgniteCheckedException
destroy in interface IgniteCacheOffheapManager.CacheDataStoreIgniteCheckedException - If failed.public void markDestroyed()
throws IgniteCheckedException
markDestroyed in interface IgniteCacheOffheapManager.CacheDataStoreIgniteCheckedExceptionpublic GridCursor<? extends CacheDataRow> cursor(int cacheId) throws IgniteCheckedException
cursor in interface IgniteCacheOffheapManager.CacheDataStorecacheId - Cache ID.IgniteCheckedException - If failed.public GridCursor<? extends CacheDataRow> cursor(int cacheId, MvccSnapshot mvccSnapshot) throws IgniteCheckedException
cursor in interface IgniteCacheOffheapManager.CacheDataStorecacheId - Cache ID.mvccSnapshot - Mvcc snapshot.IgniteCheckedException - If failed.public void clear(int cacheId)
throws IgniteCheckedException
clear in interface IgniteCacheOffheapManager.CacheDataStorecacheId - Cache ID.IgniteCheckedException - If failed.public long expiredSize()
throws IgniteCheckedException
IgniteCheckedException - If failed to get number of pending entries.public int purgeExpired(GridCacheContext cctx, IgniteInClosure2X<GridCacheEntryEx,GridCacheVersion> c, int amount) throws IgniteCheckedException
cctx - Cache context.c - Expiry closure that should be applied to expired entry. See GridCacheTtlManager for details.amount - Limit of processed entries by single call, -1 for no limit.IgniteCheckedException - If failed.public PendingEntriesTree pendingTree()
pendingTree in interface IgniteCacheOffheapManager.CacheDataStorepublic void preload()
throws IgniteCheckedException
preload in interface IgniteCacheOffheapManager.CacheDataStoreIgniteCheckedException - If failed.public void resetUpdateCounter()
resetUpdateCounter in interface IgniteCacheOffheapManager.CacheDataStorepublic void resetInitialUpdateCounter()
resetInitialUpdateCounter in interface IgniteCacheOffheapManager.CacheDataStorepublic PartitionMetaStorage partStorage()
IgniteCacheOffheapManager.CacheDataStorepartStorage in interface IgniteCacheOffheapManager.CacheDataStore
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.9.0 Release Date : October 15 2020