| Constructor and Description |
|---|
TimeBoundPageStore(PageStore pageStore,
PageStoreOptions options) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
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.
|
void |
put(PageId pageId,
java.nio.ByteBuffer page,
boolean isTemporary)
Writes a new page from a source channel to the store.
|
public TimeBoundPageStore(PageStore pageStore, PageStoreOptions options)
pageStore - page storeoptions - time out in mspublic 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 java.io.IOException, PageNotFoundException
PageStoredelete in interface PageStorepageId - page identifierjava.io.IOException - when the store fails to delete this pagePageNotFoundException - when the page isn't found in the storepublic void close()
throws java.lang.Exception
close in interface java.lang.AutoCloseablejava.lang.ExceptionCopyright © 2022. All Rights Reserved.