public class OverflowPageStorage extends PageStorage
Constructor and Description |
---|
OverflowPageStorage(PageStorage ps1,
PageStorage ps2,
long highWaterMark)
Note that highWaterMark is in BYTES, not pages
|
Modifier and Type | Method and Description |
---|---|
void |
close()
close the PageStorage; invocation of any other methods after close() has undefined results
|
int |
createPage()
creates a new page with undefined contents; returns its pageid
|
void |
fsync(int pageid)
ensure that the designated page is written to nonvolatile storage
|
int |
getNumPages()
returns the number of pages; all pageids strictly less than this are valid
|
void |
readPage(int pageid,
byte[] buf,
int ofs)
reads a page
|
void |
writePage(int pageid,
byte[] buf,
int ofs)
writes a page; throws an exception if the page did not exist
|
getPageSize
public OverflowPageStorage(PageStorage ps1, PageStorage ps2, long highWaterMark)
public int getNumPages()
PageStorage
getNumPages
in class PageStorage
public int createPage()
PageStorage
createPage
in class PageStorage
public void fsync(int pageid)
PageStorage
fsync
in class PageStorage
public void writePage(int pageid, byte[] buf, int ofs)
PageStorage
writePage
in class PageStorage
public void readPage(int pageid, byte[] buf, int ofs)
PageStorage
readPage
in class PageStorage
public void close()
PageStorage
close
in class PageStorage