com.sun.electric.database.geometry.btree
Class CachingPageStorage
java.lang.Object
com.sun.electric.database.geometry.btree.PageStorage
com.sun.electric.database.geometry.btree.CachingPageStorage
- Direct Known Subclasses:
- CachingPageStorageWrapper, MemoryPageStorage
public abstract class CachingPageStorage
- extends PageStorage
API for a PageStorage with some sort of cache; the CachingPageStorage.CachedPage
class provides an interface for interacting with the
cache.
Method Summary |
abstract 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. |
abstract void |
writePage(int pageid,
byte[] buf,
int ofs)
Write a page through the cache to nonvolatile storage |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CachingPageStorage
public CachingPageStorage(int pageSize)
getPage
public abstract 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.
writePage
public abstract void writePage(int pageid,
byte[] buf,
int ofs)
- Write a page through the cache to nonvolatile storage
- Specified by:
writePage
in class PageStorage