|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.sun.electric.database.geometry.btree.PageStorage
public abstract class PageStorage
Stores and retrieves fixed-size byte sequences indexed by a page number; page numbers are guaranteed to be contiguous starting at zero.
Constructor Summary | |
---|---|
PageStorage(int pageSize)
|
Method Summary | |
---|---|
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()
ensure that the all pages are written to nonvolatile storage |
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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PageStorage(int pageSize)
Method Detail |
---|
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 fsync()
public abstract void close()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |