public abstract class CachingPageStorage extends PageStorage
CachingPageStorage.CachedPage
class provides an interface for interacting with the
cache.Modifier and Type | Class and Description |
---|---|
class |
CachingPageStorage.CachedPage
A page which is currently in the cache; pages can be dirty or clean.
|
Constructor and Description |
---|
CachingPageStorage(int pageSize) |
Modifier and Type | Method and Description |
---|---|
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
|
close, createPage, fsync, getNumPages, getPageSize, readPage
public abstract CachingPageStorage.CachedPage getPage(int pageid, boolean readBytes)
public abstract void writePage(int pageid, byte[] buf, int ofs)
writePage
in class PageStorage