public interface PageStore
| Modifier and Type | Method and Description |
|---|---|
long |
allocatePage()
Allocates next page index.
|
void |
ensure() |
boolean |
exists()
Checks if page exists.
|
long |
pageOffset(long pageId)
Gets page offset within the store file.
|
int |
pages()
Gets number of allocated pages.
|
void |
read(long pageId,
ByteBuffer pageBuf,
boolean keepCrc)
Reads a page.
|
void |
readHeader(ByteBuffer buf)
Reads a header.
|
void |
sync()
Sync method used to ensure that the given pages are guaranteed to be written to the store.
|
int |
version() |
void |
write(long pageId,
ByteBuffer pageBuf,
int tag,
boolean calculateCrc)
Writes a page.
|
boolean exists()
True if page exists.long allocatePage()
throws IgniteCheckedException
IgniteCheckedException - If failed to allocate.int pages()
void read(long pageId,
ByteBuffer pageBuf,
boolean keepCrc)
throws IgniteCheckedException
pageId - Page ID.pageBuf - Page buffer to read into.keepCrc - by default reading zeroes CRC which was on file, but you can keep it in pageBuf if set keepCrcIgniteCheckedException - If reading failed (IO error occurred).void readHeader(ByteBuffer buf) throws IgniteCheckedException
buf - Buffer to write to.IgniteCheckedException - If failed.void write(long pageId,
ByteBuffer pageBuf,
int tag,
boolean calculateCrc)
throws IgniteCheckedException
pageId - Page ID.pageBuf - Page buffer to write.tag - Partition file version, 1-based incrementing counter. For outdated pages tag has lower value,
and write does nothing.calculateCrc - if False crc calculation will be forcibly skipped.IgniteCheckedException - If page writing failed (IO error occurred).long pageOffset(long pageId)
pageId - Page ID.void sync() throws IgniteCheckedException
IgniteCheckedException - If sync failed (IO error occurred).void ensure()
throws IgniteCheckedException
IgniteCheckedException - If sync failed (IO error occurred).int version()
Follow @ApacheIgnite
Ignite Fabric : ver. 2.4.0 Release Date : March 5 2018