@NotThreadSafe public class RocksPageStore extends Object implements PageStore
PageStore.Metrics
Modifier and Type | Method and Description |
---|---|
void |
close() |
org.rocksdb.RocksIterator |
createNewInterator() |
void |
delete(PageId pageId)
Deletes a page from the store.
|
int |
get(PageId pageId,
int pageOffset,
int bytesToRead,
PageReadTargetBuffer target,
boolean isTemporary)
Gets part of a page from the store to the destination buffer.
|
static RocksPageStore |
open(PageStoreOptions pageStoreOptions) |
void |
put(PageId pageId,
ByteBuffer page,
boolean isTemporary)
Writes a new page from a source channel to the store.
|
public static RocksPageStore open(PageStoreOptions pageStoreOptions)
pageStoreOptions
- options for the rocks page storePageStore
backed by RocksDBIOException
- if I/O error happenspublic void put(PageId pageId, ByteBuffer page, boolean isTemporary) throws IOException
PageStore
put
in interface PageStore
pageId
- page identifierpage
- page dataisTemporary
- is page data temporaryResourceExhaustedException
- when there is not enough space found on diskIOException
- when the store fails to write this pagepublic int get(PageId pageId, int pageOffset, int bytesToRead, PageReadTargetBuffer target, boolean isTemporary) throws IOException, PageNotFoundException
PageStore
get
in interface PageStore
pageId
- page identifierpageOffset
- offset within pagebytesToRead
- bytes to read in this pagetarget
- destination bufferisTemporary
- is page data temporaryIOException
- when the store fails to read this pagePageNotFoundException
- when the page isn't found in the storepublic void delete(PageId pageId) throws PageNotFoundException
PageStore
delete
in interface PageStore
pageId
- page identifierPageNotFoundException
- when the page isn't found in the storepublic void close()
close
in interface AutoCloseable
public org.rocksdb.RocksIterator createNewInterator()
Copyright © 2023. All Rights Reserved.