public class GridCacheOffheapManager extends IgniteCacheOffheapManagerImpl implements CheckpointListener
| Modifier and Type | Class and Description |
|---|---|
static class |
GridCacheOffheapManager.GridCacheDataStore |
IgniteCacheOffheapManagerImpl.CacheDataStoreImplCheckpointListener.ContextIgniteCacheOffheapManager.CacheDataStore, IgniteCacheOffheapManager.OffheapInvokeClosure| Modifier and Type | Field and Description |
|---|---|
static int |
DFLT_WAL_MARGIN_FOR_ATOMIC_CACHE_HISTORICAL_REBALANCE |
static GridCursor<CacheDataRow> |
EMPTY_CURSOR |
static String |
WAL_MARGIN_FOR_ATOMIC_CACHE_HISTORICAL_REBALANCE |
busyLock, ctx, grp, log, partStoreLock, PRELOAD_SIZE_UNDER_CHECKPOINT_LOCK| Constructor and Description |
|---|
GridCacheOffheapManager() |
| Modifier and Type | Method and Description |
|---|---|
void |
beforeCheckpointBegin(CheckpointListener.Context ctx)
Do some actions before checkpoint write lock.
|
void |
confirmPartitionStatesRestored()
Confirm that partition states are restored.
|
protected IgniteCacheOffheapManager.CacheDataStore |
createCacheDataStore0(int p) |
GridCacheOffheapManager.GridCacheDataStore |
createGridCacheDataStore(CacheGroupContext grpCtx,
int partId,
boolean exists,
IgniteLogger log) |
protected void |
destroyCacheDataStore0(IgniteCacheOffheapManager.CacheDataStore store) |
void |
destroyPartitionStore(int partId)
Invalidates page memory for given partition.
|
@Nullable RootPage |
dropRootPageForIndex(int cacheId,
String idxName,
int segment)
Dropping the root page of the index tree.
|
boolean |
expire(GridCacheContext cctx,
IgniteInClosure2X<GridCacheEntryEx,GridCacheVersion> c,
int amount) |
long |
expiredSize()
Gets the number of entries pending expire.
|
void |
findAndCleanupLostIndexesForStoppedCache(int cacheId) |
@Nullable RootPage |
findRootPageForIndex(int cacheId,
String idxName,
int segment) |
IndexStorage |
getIndexStorage()
Get internal IndexStorage.
|
protected @Nullable IgniteHistoricalIterator |
historicalIterator(CachePartitionPartialCountersMap partCntrs,
Set<Integer> missing) |
protected void |
initDataStructures() |
protected void |
initPendingTree(GridCacheContext cctx) |
void |
onCheckpointBegin(CheckpointListener.Context ctx) |
void |
onMarkCheckpointBegin(CheckpointListener.Context ctx) |
void |
preloadPartition(int partId)
Preload a partition.
|
static @Nullable Map<Integer,Long> |
readSharedGroupCacheSizes(PageSupport pageMem,
int grpId,
long cntrsPageId)
Loads cache sizes for all caches in shared group.
|
@Nullable RootPage |
renameRootPageForIndex(int cacheId,
String oldIdxName,
String newIdxName,
int segment)
Renaming the root page of the index tree.
|
void |
restorePartitionStates()
Pre-create partitions that resides in page memory or WAL and restores their state.
|
long |
restoreStateOfPartition(int p,
@Nullable Integer recoveryState)
Pre-create single partition that resides in page memory or WAL and restores their state.
|
ReuseList |
reuseListForIndex(String idxName) |
RootPage |
rootPageForIndex(int cacheId,
String idxName,
int segment) |
void |
stop()
Stop cache group (due to cache destroy or cluster deactivate).
|
static long |
writeSharedGroupCacheSizes(PageMemory pageMem,
int grpId,
long cntrsPageId,
int partId,
Map<Integer,Long> sizes)
Saves cache sizes for all caches in shared group.
|
cacheDataStores, cacheEntriesCount, cacheEntriesCount, cacheEntriesCount, cacheEntriesIterator, cacheIterator, cacheKeysIterator, cachePartitionIterator, clearCache, containsKey, createCacheDataStore, dataStore, destroyCacheDataStore, globalRemoveId, invoke, mvccAllVersions, mvccAllVersionsCursor, mvccApplyHistoryIfAbsent, mvccApplyUpdate, mvccInitialValue, mvccLock, mvccRead, mvccRemove, mvccRemoveAll, mvccUpdate, mvccUpdateRowWithPreloadInfo, offHeapAllocatedSize, onCacheStarted, onKernalStop, onUndeploy, partitionIterator, prepareToStop, read, read, rebalanceIterator, remove, reservedIterator, start, stopCache, storeEntries, treeName, updateclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitafterCheckpointEndpublic static final int DFLT_WAL_MARGIN_FOR_ATOMIC_CACHE_HISTORICAL_REBALANCE
@SystemProperty(value="The WAL iterator margin that is used to prevent partitions divergence on the historical rebalance of atomic caches", type=java.lang.Long.class, defaults="5") public static final String WAL_MARGIN_FOR_ATOMIC_CACHE_HISTORICAL_REBALANCE
public static final GridCursor<CacheDataRow> EMPTY_CURSOR
protected void initPendingTree(GridCacheContext cctx) throws IgniteCheckedException
initPendingTree in class IgniteCacheOffheapManagerImplcctx - Cache context.IgniteCheckedException - If failed.protected void initDataStructures()
throws IgniteCheckedException
initDataStructures in class IgniteCacheOffheapManagerImplIgniteCheckedException - If failed.public IndexStorage getIndexStorage()
UpgradePendingTreeToPerPartitionTask for details.protected IgniteCacheOffheapManager.CacheDataStore createCacheDataStore0(int p) throws IgniteCheckedException
createCacheDataStore0 in class IgniteCacheOffheapManagerImplp - Partition.IgniteCheckedException - If failed.public void onCheckpointBegin(CheckpointListener.Context ctx) throws IgniteCheckedException
onCheckpointBegin in interface CheckpointListenerIgniteCheckedException - If failed.public void onMarkCheckpointBegin(CheckpointListener.Context ctx) throws IgniteCheckedException
onMarkCheckpointBegin in interface CheckpointListenerIgniteCheckedException - If failed.public void beforeCheckpointBegin(CheckpointListener.Context ctx) throws IgniteCheckedException
beforeCheckpointBegin in interface CheckpointListenerIgniteCheckedException - If failed.public long restoreStateOfPartition(int p,
@Nullable
@Nullable Integer recoveryState)
throws IgniteCheckedException
restoreStateOfPartition in interface IgniteCacheOffheapManagerrestoreStateOfPartition in class IgniteCacheOffheapManagerImplp - Partition id.recoveryState - Partition recovery state.IgniteCheckedException - If failed.public void restorePartitionStates()
throws IgniteCheckedException
restorePartitionStates in interface IgniteCacheOffheapManagerrestorePartitionStates in class IgniteCacheOffheapManagerImplIgniteCheckedException - If failed.public void confirmPartitionStatesRestored()
IgniteCacheOffheapManager.restoreStateOfPartition(int, Integer).confirmPartitionStatesRestored in interface IgniteCacheOffheapManagerconfirmPartitionStatesRestored in class IgniteCacheOffheapManagerImpl@Nullable public static @Nullable Map<Integer,Long> readSharedGroupCacheSizes(PageSupport pageMem, int grpId, long cntrsPageId) throws IgniteCheckedException
pageMem - page memory to perform operations on pages.grpId - Cache group ID.cntrsPageId - Counters page ID, if zero is provided that means no counters page exist.IgniteCheckedException - If page memory operation failed.public static long writeSharedGroupCacheSizes(PageMemory pageMem, int grpId, long cntrsPageId, int partId, Map<Integer,Long> sizes) throws IgniteCheckedException
pageMem - page memory to perform operations on pages.grpId - Cache group ID.cntrsPageId - Counters page ID, if zero is provided that means no counters page exist.partId - Partition ID.sizes - Cache sizes of all caches in group. Not null.cntrsPageId or new value if cache size pages were initialized.IgniteCheckedException - if page memory operation failed.protected void destroyCacheDataStore0(IgniteCacheOffheapManager.CacheDataStore store) throws IgniteCheckedException
destroyCacheDataStore0 in class IgniteCacheOffheapManagerImplstore - Cache data store.IgniteCheckedException - If failed.public void destroyPartitionStore(int partId)
throws IgniteCheckedException
partId - Partition ID.IgniteCheckedException - If destroy has failed.public RootPage rootPageForIndex(int cacheId, String idxName, int segment) throws IgniteCheckedException
rootPageForIndex in interface IgniteCacheOffheapManagerrootPageForIndex in class IgniteCacheOffheapManagerImplcacheId - Cache ID.idxName - Index name.segment - Segment.IgniteCheckedException - If failed.@Nullable public @Nullable RootPage findRootPageForIndex(int cacheId, String idxName, int segment) throws IgniteCheckedException
findRootPageForIndex in interface IgniteCacheOffheapManagerfindRootPageForIndex in class IgniteCacheOffheapManagerImplcacheId - Cache ID.idxName - Index name.IgniteCheckedException - If failed.@Nullable public @Nullable RootPage dropRootPageForIndex(int cacheId, String idxName, int segment) throws IgniteCheckedException
dropRootPageForIndex in interface IgniteCacheOffheapManagerdropRootPageForIndex in class IgniteCacheOffheapManagerImplcacheId - Cache ID.idxName - Index name.segment - Segment index.IgniteCheckedException - If failed.@Nullable public @Nullable RootPage renameRootPageForIndex(int cacheId, String oldIdxName, String newIdxName, int segment) throws IgniteCheckedException
renameRootPageForIndex in interface IgniteCacheOffheapManagerrenameRootPageForIndex in class IgniteCacheOffheapManagerImplcacheId - Cache id.oldIdxName - Old name of the index tree.newIdxName - New name of the index tree.segment - Segment index.IgniteCheckedException - If failed.public ReuseList reuseListForIndex(String idxName)
reuseListForIndex in interface IgniteCacheOffheapManagerreuseListForIndex in class IgniteCacheOffheapManagerImplidxName - Index name.public void stop()
stop in interface IgniteCacheOffheapManagerstop in class IgniteCacheOffheapManagerImpl@Nullable protected @Nullable IgniteHistoricalIterator historicalIterator(CachePartitionPartialCountersMap partCntrs, Set<Integer> missing) throws IgniteCheckedException
historicalIterator in class IgniteCacheOffheapManagerImplpartCntrs - Partition counters map.missing - Set of partitions need to populate if partition is missing or failed to reserve.IgniteCheckedException - If failed.public boolean expire(GridCacheContext cctx, IgniteInClosure2X<GridCacheEntryEx,GridCacheVersion> c, int amount) throws IgniteCheckedException
expire in interface IgniteCacheOffheapManagerexpire in class IgniteCacheOffheapManagerImplcctx - Cache context.c - Closure.amount - Limit of processed entries by single call, -1 for no limit.True if unprocessed expired entries remains.IgniteCheckedException - If failed.public long expiredSize()
throws IgniteCheckedException
expiredSize in interface IgniteCacheOffheapManagerexpiredSize in class IgniteCacheOffheapManagerImplIgniteCheckedException - If failed to get number of pending entries.public void preloadPartition(int partId)
throws IgniteCheckedException
preloadPartition in interface IgniteCacheOffheapManagerpreloadPartition in class IgniteCacheOffheapManagerImplpartId - Partition id.IgniteCheckedException - If failed.public void findAndCleanupLostIndexesForStoppedCache(int cacheId)
throws IgniteCheckedException
cacheId - Which was stopped, but its data still presented.IgniteCheckedException - If failed.public GridCacheOffheapManager.GridCacheDataStore createGridCacheDataStore(CacheGroupContext grpCtx, int partId, boolean exists, IgniteLogger log)
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.15.0 Release Date : April 25 2023