public interface IgnitePageStoreManager extends GridCacheSharedManager, IgniteChangeGlobalStateSupport, PageReadWriteManager
| Modifier and Type | Method and Description |
|---|---|
long |
allocatePage(int grpId,
int partId,
byte flags)
Allocates a page for the given page space.
|
void |
beginRecover()
Invoked before starting checkpoint recover.
|
boolean |
checkAndInitCacheWorkDir(CacheConfiguration cacheCfg)
Creates and initializes cache work directory retrieved from
cacheCfg. |
void |
cleanupPageStoreIfMatch(Predicate<Integer> cacheGrpPred,
boolean cleanFiles)
Cleanup cache store whether it matches the provided predicate and if matched
store was previously initizlized.
|
void |
cleanupPersistentSpace()
Cleanup persistent space for all caches except metastore.
|
void |
cleanupPersistentSpace(CacheConfiguration cacheConfiguration)
Cleanup persistent space for cache.
|
void |
ensure(int grpId,
int partId) |
boolean |
exists(int grpId,
int partId)
Checks if partition store exists.
|
void |
finishRecover()
Invoked after checkpoint recover is finished.
|
boolean |
hasIndexStore(int grpId) |
void |
initialize(int cacheId,
int partitions,
String workingDir,
PageMetrics pageMetrics)
Initializes disk store structures.
|
void |
initializeForCache(CacheGroupDescriptor grpDesc,
StoredCacheData cacheData)
Callback called when a cache is starting.
|
void |
initializeForMetastorage()
Initializes disk cache store structures.
|
void |
onPartitionCreated(int grpId,
int partId)
Callback called when a partition is created on the local node.
|
void |
onPartitionDestroyed(int grpId,
int partId,
int tag)
Callback called when a partition for the given cache is evicted from the local node.
|
long |
pageOffset(int grpId,
long pageId)
Gets page offset within the page store file.
|
int |
pages(int grpId,
int partId)
Gets total number of allocated pages for the given space.
|
long |
pagesAllocated(int grpId)
Calculates number of pages currently allocated for given cache group.
|
Map<String,StoredCacheData> |
readCacheConfigurations() |
void |
readHeader(int grpId,
int partId,
ByteBuffer buf)
Reads a header of a page store.
|
void |
removeCacheData(StoredCacheData cacheData)
Remove cache configuration data file.
|
void |
shutdownForCacheGroup(CacheGroupContext grp,
boolean destroy)
Callback called when a cache is stopping.
|
void |
storeCacheData(StoredCacheData cacheData,
boolean overwrite) |
void |
sync(int grpId,
int partId)
Makes sure that all previous writes to the store has been written to disk.
|
PageStore |
write(int grpId,
long pageId,
ByteBuffer pageBuf,
int tag,
boolean calculateCrc)
Writes the page for the given cache ID.
|
onDisconnected, onKernalStart, onKernalStop, onReconnected, printMemoryStats, start, stoponActivate, onDeActivatereadvoid beginRecover()
void finishRecover()
throws IgniteCheckedException
IgniteCheckedExceptionvoid initialize(int cacheId,
int partitions,
String workingDir,
PageMetrics pageMetrics)
throws IgniteCheckedException
cacheId - Cache id.partitions - Partitions count.workingDir - Working directory.pageMetrics - Page metrics.IgniteCheckedException - If failed.void initializeForCache(CacheGroupDescriptor grpDesc, StoredCacheData cacheData) throws IgniteCheckedException
grpDesc - Cache group descriptor.cacheData - Cache data of the cache being started.IgniteCheckedException - If failed to handle cache start callback.void initializeForMetastorage()
throws IgniteCheckedException
IgniteCheckedExceptionvoid shutdownForCacheGroup(CacheGroupContext grp, boolean destroy) throws IgniteCheckedException
grp - Cache group being stopped.destroy - Flag indicating if the cache is being destroyed and data should be cleaned.IgniteCheckedException - If failed to handle cache destroy callback.void onPartitionCreated(int grpId,
int partId)
throws IgniteCheckedException
grpId - Cache group ID where the partition is being created.partId - ID of the partition being created.IgniteCheckedException - If failed to handle partition create callback.void onPartitionDestroyed(int grpId,
int partId,
int tag)
throws IgniteCheckedException
grpId - Cache group ID of the evicted partition.partId - Partition ID.tag - Partition tag (growing 1-based partition file version).IgniteCheckedException - If failed to handle partition destroy callback.boolean exists(int grpId,
int partId)
throws IgniteCheckedException
grpId - Cache group ID.partId - Partition ID.True if partition store exists.IgniteCheckedException - If failed.void readHeader(int grpId,
int partId,
ByteBuffer buf)
throws IgniteCheckedException
grpId - Cache group ID.partId - Partition ID.buf - Buffer to write to.IgniteCheckedException - If failed.PageStore write(int grpId, long pageId, ByteBuffer pageBuf, int tag, boolean calculateCrc) throws IgniteCheckedException
0 if the page is a meta page.write in interface PageReadWriteManagergrpId - Cache group ID.pageId - Page ID.pageBuf - Page buffer to write.IgniteCheckedException - If failed to write page.long pageOffset(int grpId,
long pageId)
throws IgniteCheckedException
grpId - Cache group ID.pageId - Page ID.IgniteCheckedException - If failed.void sync(int grpId,
int partId)
throws IgniteCheckedException
grpId - Cache group ID to sync.partId - Partition ID to sync.IgniteCheckedException - If IO error occurred while running sync.void ensure(int grpId,
int partId)
throws IgniteCheckedException
grpId - Cache group ID.partId - Partition ID.IgniteCheckedException - If failed.long allocatePage(int grpId,
int partId,
byte flags)
throws IgniteCheckedException
allocatePage in interface PageReadWriteManagergrpId - Cache group ID.partId - Partition ID. Used only if flags is not equal to PageIdAllocator.FLAG_IDX.flags - Page allocation flags.IgniteCheckedException - If IO exception occurred while allocating a page ID.int pages(int grpId,
int partId)
throws IgniteCheckedException
grpId - Cache group ID.partId - Partition ID.IgniteCheckedException - If failed.Map<String,StoredCacheData> readCacheConfigurations() throws IgniteCheckedException
IgniteCheckedException - If failed.void storeCacheData(StoredCacheData cacheData, boolean overwrite) throws IgniteCheckedException
cacheData - Cache configuration.overwrite - Whether stored configuration should be overwritten if it exists.IgniteCheckedException - If failed.void removeCacheData(StoredCacheData cacheData) throws IgniteCheckedException
cacheData - Cache configuration.IgniteCheckedException - If failed.boolean hasIndexStore(int grpId)
grpId - Cache group ID.True if index store for given cache group existed before node started.long pagesAllocated(int grpId)
grpId - cache group id.void cleanupPersistentSpace(CacheConfiguration cacheConfiguration) throws IgniteCheckedException
cacheConfiguration - Cache configuration of cache which should be cleanup.IgniteCheckedExceptionvoid cleanupPersistentSpace()
throws IgniteCheckedException
IgniteCheckedExceptionvoid cleanupPageStoreIfMatch(Predicate<Integer> cacheGrpPred, boolean cleanFiles)
cacheGrpPred - Predicate to match by id cache group stores to clean.cleanFiles - True to delete all persisted files related to particular store.boolean checkAndInitCacheWorkDir(CacheConfiguration cacheCfg) throws IgniteCheckedException
cacheCfg.cacheCfg - Cache configuration.True if work directory already exists.IgniteCheckedException - If failed.
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.11.0 Release Date : September 11 2021