|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.sun.electric.database.geometry.btree.PageStorage
com.sun.electric.database.geometry.btree.FilePageStorage
public class FilePageStorage
PageStorage implemented via a RandomAccessFile. No PageStorage(RandomAccessFile) constructor is provided because the on-disk format is not yet stable.
| Method Summary | |
|---|---|
void |
close()
close the PageStorage; invocation of any other methods after close() has undefined results |
static FilePageStorage |
create()
Create a new FilePageStorage; no PageStorage(RandomAccessFile) constructor is provided because the on-disk format is not yet stable. |
int |
createPage()
creates a new page with undefined contents; returns its pageid |
void |
fsync()
ensure that the all pages are written to nonvolatile storage |
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 |
| Methods inherited from class com.sun.electric.database.geometry.btree.PageStorage |
|---|
getPageSize |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static FilePageStorage create()
public int getNumPages()
PageStorage
getNumPages in class PageStoragepublic int createPage()
PageStorage
createPage 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 PageStoragepublic void fsync(int pageid)
PageStorage
fsync in class PageStoragepublic void fsync()
PageStorage
fsync in class PageStoragepublic void close()
PageStorage
close in class PageStorage
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||