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.
|
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 cacheName,
PageMetrics pageMetrics)
Initializes disk store structures.
|
void |
initializeForCache(CacheGroupDescriptor grpDesc,
CacheConfiguration<?,?> ccfg)
Callback called when a cache is starting.
|
void |
initializeForMetastorage()
Initializes disk cache store structures.
|
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.
|
void |
readHeader(int grpId,
int partId,
ByteBuffer buf)
Reads a header of a page store.
|
void |
shutdownForCacheGroup(CacheGroupContext grp,
boolean destroy)
Callback called when a cache is stopping.
|
void |
sync(int grpId,
int partId)
Makes sure that all previous writes to the store has been written to disk.
|
void |
truncate(int grpId,
int partId,
int tag)
Callback called when a partition for the given cache is evicted from the local node.
|
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 cacheName,
PageMetrics pageMetrics)
throws IgniteCheckedException
cacheId - Cache id.partitions - Partitions count.cacheName - Cache name.pageMetrics - Page metrics.IgniteCheckedException - If failed.void initializeForCache(CacheGroupDescriptor grpDesc, CacheConfiguration<?,?> ccfg) throws IgniteCheckedException
grpDesc - Cache group descriptor.ccfg - Cache configuration.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 truncate(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.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.
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.15.0 Release Date : April 25 2023