@NotThreadSafe public class RocksPageStore extends java.lang.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,
java.nio.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 RocksDBjava.io.IOException - if I/O error happenspublic void put(PageId pageId, java.nio.ByteBuffer page, boolean isTemporary) throws java.io.IOException
PageStoreput in interface PageStorepageId - page identifierpage - page dataisTemporary - is page data temporaryResourceExhaustedException - when there is not enough space found on diskjava.io.IOException - when the store fails to write this pagepublic int get(PageId pageId, int pageOffset, int bytesToRead, PageReadTargetBuffer target, boolean isTemporary) throws java.io.IOException, PageNotFoundException
PageStoreget in interface PageStorepageId - page identifierpageOffset - offset within pagebytesToRead - bytes to read in this pagetarget - destination bufferisTemporary - is page data temporaryjava.io.IOException - when the store fails to read this pagePageNotFoundException - when the page isn't found in the storepublic void delete(PageId pageId) throws PageNotFoundException
PageStoredelete in interface PageStorepageId - page identifierPageNotFoundException - when the page isn't found in the storepublic void close()
close in interface java.lang.AutoCloseablepublic org.rocksdb.RocksIterator createNewInterator()
Copyright © 2022. All Rights Reserved.