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,
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,
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.
|
void |
finalizeUpdateCountres()
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.
|
void |
init(long size,
long updCntr,
Map<Integer,Long> cacheSizes) |
long |
initialUpdateCounter() |
void |
invoke(GridCacheContext cctx,
KeyCacheObject key,
IgniteCacheOffheapManager.OffheapInvokeClosure c) |
GridCursor<CacheDataRow> |
mvccAllVersionsCursor(GridCacheContext cctx,
KeyCacheObject key,
Object x)
Returns iterator over the all row versions for the given key.
|
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,
CacheObject val,
GridCacheVersion ver,
long expireTime,
MvccVersion mvccVer,
MvccVersion newMvccVer) |
boolean |
mvccInitialValueIfAbsent(GridCacheContext cctx,
KeyCacheObject key,
CacheObject val,
GridCacheVersion ver,
long expireTime,
MvccVersion mvccVer,
MvccVersion newMvccVer,
byte txState,
byte newTxState) |
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) |
GridLongList |
mvccRemoveNative(GridCacheContext cctx,
boolean primary,
KeyCacheObject key,
MvccSnapshot mvccSnapshot) |
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) |
GridLongList |
mvccUpdateNative(GridCacheContext cctx,
boolean primary,
KeyCacheObject key,
CacheObject val,
GridCacheVersion ver,
long expireTime,
MvccSnapshot mvccSnapshot) |
boolean |
mvccUpdateRowWithPreloadInfo(GridCacheContext cctx,
KeyCacheObject key,
CacheObject val,
GridCacheVersion ver,
long expireTime,
MvccVersion mvccVer,
MvccVersion newMvccVer,
byte mvccTxState,
byte newMvccTxState) |
String |
name() |
long |
nextUpdateCounter() |
int |
partId() |
PendingEntriesTree |
pendingTree()
Return PendingTree for data store.
|
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) |
RowStore |
rowStore() |
void |
setRowCacheCleaner(GridQueryRowCacheCleaner rowCacheCleaner)
Inject rows cache cleaner.
|
void |
update(GridCacheContext cctx,
KeyCacheObject key,
CacheObject val,
GridCacheVersion ver,
long expireTime,
CacheDataRow oldRow) |
long |
updateCounter() |
void |
updateCounter(long val) |
void |
updateCounter(long start,
long delta)
Updates counters from start value by delta value.
|
void |
updateInitialCounter(long cntr) |
void |
updateSize(int cacheId,
long delta)
Updates size metric for particular cache.
|
void |
updateTxState(GridCacheContext cctx,
CacheSearchRow row) |
public int partId()
partId in interface IgniteCacheOffheapManager.CacheDataStorepublic String name()
name in interface IgniteCacheOffheapManager.CacheDataStorepublic RowStore rowStore()
rowStore in interface IgniteCacheOffheapManager.CacheDataStorepublic long fullSize()
fullSize in interface IgniteCacheOffheapManager.CacheDataStorepublic 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 getAndIncrementUpdateCounter(long delta)
getAndIncrementUpdateCounter in interface IgniteCacheOffheapManager.CacheDataStoredelta - Delta.public void init(long size,
long updCntr,
@Nullable
Map<Integer,Long> cacheSizes)
init in interface IgniteCacheOffheapManager.CacheDataStoresize - Size to init.updCntr - Update counter to init.cacheSizes - Cache sizes if store belongs to group containing multiple caches.public void updateCounter(long val)
updateCounter in interface IgniteCacheOffheapManager.CacheDataStoreval - Update counter.public void updateCounter(long start,
long delta)
updateCounter in interface IgniteCacheOffheapManager.CacheDataStorestart - Start.delta - Deltapublic void finalizeUpdateCountres()
finalizeUpdateCountres in interface IgniteCacheOffheapManager.CacheDataStorepublic long nextUpdateCounter()
nextUpdateCounter in interface IgniteCacheOffheapManager.CacheDataStorepublic long initialUpdateCounter()
initialUpdateCounter in interface IgniteCacheOffheapManager.CacheDataStorepublic void updateInitialCounter(long cntr)
updateInitialCounter in interface IgniteCacheOffheapManager.CacheDataStorecntr - Counter.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 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 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 mvccInitialValueIfAbsent(GridCacheContext cctx, KeyCacheObject key, @Nullable CacheObject val, GridCacheVersion ver, long expireTime, MvccVersion mvccVer, MvccVersion newMvccVer, byte txState, byte newTxState) throws IgniteCheckedException
mvccInitialValueIfAbsent in interface IgniteCacheOffheapManager.CacheDataStorecctx - Cache context.key - Key.val - Value.ver - Version.mvccVer - MVCC version.newMvccVer - New MVCC version.txState - Tx state hint for the mvcc version.newTxState - Tx state hint for the new mvcc version.True if new value was inserted.IgniteCheckedException - If failed.public boolean mvccUpdateRowWithPreloadInfo(GridCacheContext cctx, KeyCacheObject key, @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) 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.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 GridLongList mvccUpdateNative(GridCacheContext cctx, boolean primary, KeyCacheObject key, CacheObject val, GridCacheVersion ver, long expireTime, MvccSnapshot mvccSnapshot) throws IgniteCheckedException
mvccUpdateNative in interface IgniteCacheOffheapManager.CacheDataStorecctx - Cache context.primary - True if update is executed on primary node.key - Key.val - Value.ver - Version.expireTime - Expire time.mvccSnapshot - MVCC snapshot.IgniteCheckedException - If failed.public GridLongList mvccRemoveNative(GridCacheContext cctx, boolean primary, KeyCacheObject key, MvccSnapshot mvccSnapshot) throws IgniteCheckedException
mvccRemoveNative in interface IgniteCacheOffheapManager.CacheDataStorecctx - Cache context.primary - True if update is executed on primary node.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 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 int cleanup(GridCacheContext cctx, @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 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.CacheDataStore
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.7.5 Release Date : June 4 2019