|
|||||||||
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 com.sun.electric.database.geometry.btree.CachingPageStorage com.sun.electric.database.geometry.btree.MemoryPageStorage
public class MemoryPageStorage
A PageStorage that uses plain old memory.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.sun.electric.database.geometry.btree.CachingPageStorage |
---|
CachingPageStorage.CachedPage |
Constructor Summary | |
---|---|
MemoryPageStorage(int pagesize)
|
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()
no-op |
void |
fsync(int pageid)
no-op |
int |
getNumPages()
returns the number of pages; all pageids strictly less than this are valid |
CachingPageStorage.CachedPage |
getPage(int pageid,
boolean readBytes)
Creates space in the cache for pageid, but only actually reads the bytes if readBytes is true; if the page was not already in the cache and readBytes is false, subsequent calls to setDirty()/flush() will overwrite data previously on the page. |
void |
readPage(int pageid,
byte[] buf,
int ofs)
reads a page |
void |
writePage(int pageid,
byte[] buf,
int ofs)
Write a page through the cache to nonvolatile storage |
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 MemoryPageStorage(int pagesize)
Method Detail |
---|
public int getNumPages()
PageStorage
getNumPages
in class PageStorage
public int createPage()
PageStorage
createPage
in class PageStorage
public void fsync(int pageid)
fsync
in class PageStorage
public void fsync()
fsync
in class PageStorage
public void writePage(int pageid, byte[] buf, int ofs)
CachingPageStorage
writePage
in class CachingPageStorage
public void readPage(int pageid, byte[] buf, int ofs)
PageStorage
readPage
in class PageStorage
public void close()
PageStorage
close
in class PageStorage
public CachingPageStorage.CachedPage getPage(int pageid, boolean readBytes)
CachingPageStorage
getPage
in class CachingPageStorage
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |