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.
|
void |
write(long pageId,
ByteBuffer pageBuf,
int tag)
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) throws IgniteCheckedException
pageId
- Page ID.pageBuf
- Page buffer to write.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).
Follow @ApacheIgnite
Ignite Fabric : ver. 2.0.0 Release Date : April 30 2017