|
|||||||||
| 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.OverflowPageStorage
public class OverflowPageStorage
Combines two PageStorage objects, using the first until the "high water mark" is exceeded, then moving to the other. Generally the first PageStorage is "small but fast" and the second is "large but slow". Might not be thread-safe.
| Constructor Summary | |
|---|---|
OverflowPageStorage(PageStorage ps1,
PageStorage ps2,
long highWaterMark)
Note that highWaterMark is in BYTES, not pages |
|
| Method Summary | |
|---|---|
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()
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 |
| Constructor Detail |
|---|
public OverflowPageStorage(PageStorage ps1,
PageStorage ps2,
long highWaterMark)
| Method Detail |
|---|
public int getNumPages()
PageStorage
getNumPages in class PageStoragepublic int createPage()
PageStorage
createPage in class PageStoragepublic void fsync(int pageid)
PageStorage
fsync in class PageStoragepublic void fsync()
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 PageStoragepublic void close()
PageStorage
close in class PageStorage
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||