ostore.cache
Class CachePolicy.Line

java.lang.Object
  |
  +--ostore.cache.CachePolicy.Line
Enclosing class:
CachePolicy

public static class CachePolicy.Line
extends Object

Opaque type used to reference line in cache.

A note on locking: references to the _next and _prev pointers in a Line are controled by locking the CachePolicy object. This nicely avoids deadlock during the remove function, for example, where we want to lock several Lines at a time. References to the referenced and modified bits, on the other hand, are controled by locking the line itself.


Field Summary
 CachePolicy.Line _next
           
 CachePolicy.Line _prev
           
 
Constructor Summary
CachePolicy.Line(boolean modified)
          Constructs a new CachePolicy.Line.
 
Method Summary
 CachePolicy.Line get_next()
           
 CachePolicy.Line get_prev()
           
 boolean in_clock()
           
 boolean modified()
           
 boolean referenced()
           
 void set_modified()
           
 void set_next(CachePolicy.Line next)
           
 void set_prev(CachePolicy.Line prev)
           
 void set_referenced()
           
 void unset_modified()
           
 void unset_referenced()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_next

public CachePolicy.Line _next

_prev

public CachePolicy.Line _prev
Constructor Detail

CachePolicy.Line

public CachePolicy.Line(boolean modified)
Constructs a new CachePolicy.Line.

Parameters:
modified - indicate if line has been modified.
Method Detail

referenced

public boolean referenced()

modified

public boolean modified()

set_referenced

public void set_referenced()

unset_referenced

public void unset_referenced()

set_modified

public void set_modified()

unset_modified

public void unset_modified()

in_clock

public boolean in_clock()

get_next

public CachePolicy.Line get_next()

get_prev

public CachePolicy.Line get_prev()

set_next

public void set_next(CachePolicy.Line next)

set_prev

public void set_prev(CachePolicy.Line prev)