public interface IgnitePageStoreManager extends GridCacheSharedManager, IgniteChangeGlobalStateSupport
Modifier and Type | Method and Description |
---|---|
long |
allocatePage(int cacheId,
int partId,
byte flags)
Allocates a page for the given page space.
|
void |
beginRecover()
Invoked before starting checkpoint recover.
|
void |
ensure(int cacheId,
int partId) |
boolean |
exists(int cacheId,
int partId)
Checks if page exists.
|
void |
finishRecover()
Invoked after checkpoint recover is finished.
|
boolean |
hasIndexStore(int cacheId) |
void |
initializeForCache(CacheConfiguration ccfg)
Callback called when a cache is starting.
|
long |
metaPageId(int cacheId)
Gets meta page ID for specified cache.
|
void |
onPartitionCreated(int cacheId,
int partId)
Callback called when a partition is created on the local node.
|
void |
onPartitionDestroyed(int cacheId,
int partId,
int tag)
Callback called when a partition for the given cache is evicted from the local node.
|
long |
pageOffset(int cacheId,
long pageId)
Gets page offset within the page store file.
|
int |
pages(int cacheId,
int partId)
Gets total number of allocated pages for the given space.
|
void |
read(int cacheId,
long pageId,
ByteBuffer pageBuf)
Reads a page for the given cache ID.
|
CacheConfiguration |
readConfiguration(String cacheName) |
void |
readHeader(int cacheId,
int partId,
ByteBuffer buf)
Reads a header of apage store.
|
Set<String> |
savedCacheNames() |
void |
shutdownForCache(GridCacheContext cacheCtx,
boolean destroy)
Callback called when a cache is stopping.
|
void |
sync(int cacheId,
int partId)
Makes sure that all previous writes to the store has been written to disk.
|
void |
write(int cacheId,
long pageId,
ByteBuffer pageBuf,
int tag)
Writes the page for the given cache ID.
|
onDisconnected, onKernalStart, onKernalStop, printMemoryStats, start, stop
onActivate, onDeActivate
void beginRecover()
void finishRecover()
void initializeForCache(CacheConfiguration ccfg) throws IgniteCheckedException
ccfg
- Cache configuration of the cache being started.IgniteCheckedException
- If failed to handle cache start callback.void shutdownForCache(GridCacheContext cacheCtx, boolean destroy) throws IgniteCheckedException
cacheCtx
- Cache context of the cache 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 cacheId, int partId) throws IgniteCheckedException
cacheId
- Cache 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 cacheId, int partId, int tag) throws IgniteCheckedException
cacheId
- Cache ID of the evicted partition.partId
- Partition ID.IgniteCheckedException
- If failed to handle partition destroy callback.void read(int cacheId, long pageId, ByteBuffer pageBuf) throws IgniteCheckedException
0
if the page is a meta page.cacheId
- Cache ID.pageId
- PageID to read.pageBuf
- Page buffer to write to.IgniteCheckedException
- If failed to read the page.boolean exists(int cacheId, int partId) throws IgniteCheckedException
cacheId
- Cache ID.partId
- Partition ID.True
if page exists.IgniteCheckedException
- If failed.void readHeader(int cacheId, int partId, ByteBuffer buf) throws IgniteCheckedException
cacheId
- Cache ID.partId
- Partition ID.buf
- Buffer to write to.IgniteCheckedException
- If failed.void write(int cacheId, long pageId, ByteBuffer pageBuf, int tag) throws IgniteCheckedException
0
if the page is a meta page.cacheId
- Cache ID.pageId
- Page ID.pageBuf
- Page buffer to write.IgniteCheckedException
- If failed to write page.long pageOffset(int cacheId, long pageId) throws IgniteCheckedException
cacheId
- Cache ID.pageId
- Page ID.IgniteCheckedException
- If failed.void sync(int cacheId, int partId) throws IgniteCheckedException
cacheId
- Cache ID to sync.partId
- Partition ID to sync.IgniteCheckedException
- If IO error occurred while running sync.void ensure(int cacheId, int partId) throws IgniteCheckedException
cacheId
- Cache ID.partId
- Partition ID.IgniteCheckedException
- If failed.long allocatePage(int cacheId, int partId, byte flags) throws IgniteCheckedException
cacheId
- Cache ID.partId
- Partition ID. Used only if flags
is equal to PageIdAllocator.FLAG_DATA
.flags
- Page allocation flags.IgniteCheckedException
- If IO exception occurred while allocating a page ID.int pages(int cacheId, int partId) throws IgniteCheckedException
cacheId
- Cache ID.partId
- Partition ID.IgniteCheckedException
- If failed.long metaPageId(int cacheId)
cacheId
- Cache ID.Set<String> savedCacheNames()
CacheConfiguration readConfiguration(String cacheName)
cacheName
- Cache name.boolean hasIndexStore(int cacheId)
cacheId
- Cache ID.True
if index store for given cache existed before node started.
Follow @ApacheIgnite
Ignite Fabric : ver. 2.0.0 Release Date : April 30 2017