com.sun.electric.database.geometry.btree
Class CachingPageStorage.CachedPage

java.lang.Object
  extended by com.sun.electric.database.geometry.btree.CachingPageStorage.CachedPage
Direct Known Subclasses:
CachingPageStorageWrapper.CachedPageImpl
Enclosing class:
CachingPageStorage

public abstract class CachingPageStorage.CachedPage
extends java.lang.Object

A page which is currently in the cache; pages can be dirty or clean.


Constructor Summary
CachingPageStorage.CachedPage()
           
 
Method Summary
abstract  void flush()
          if the page is dirty, write it back to nonvolatile storage and mark it not dirty
abstract  byte[] getBuf()
          gets the byte[] for this page; it is okay to manipulate it directly, but you must call setDirty() and flush() afterwards
abstract  int getPageId()
          the pageid of this cached page
abstract  boolean isDirty()
          returns true if the page is marked dirty
abstract  void setDirty()
          marks the page as "dirty"; that is, in need of being written back to nonvolatile storage
abstract  void touch()
          indicates that the page has been accessed (either a read or a write) for purposes of least-recently-used calculations
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CachingPageStorage.CachedPage

public CachingPageStorage.CachedPage()
Method Detail

getBuf

public abstract byte[] getBuf()
gets the byte[] for this page; it is okay to manipulate it directly, but you must call setDirty() and flush() afterwards


getPageId

public abstract int getPageId()
the pageid of this cached page


touch

public abstract void touch()
indicates that the page has been accessed (either a read or a write) for purposes of least-recently-used calculations


setDirty

public abstract void setDirty()
marks the page as "dirty"; that is, in need of being written back to nonvolatile storage


flush

public abstract void flush()
if the page is dirty, write it back to nonvolatile storage and mark it not dirty


isDirty

public abstract boolean isDirty()
returns true if the page is marked dirty