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