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.
Constructor Summary |
CachePolicy.Line(boolean modified)
Constructs a new CachePolicy.Line . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_next
public CachePolicy.Line _next
_prev
public CachePolicy.Line _prev
CachePolicy.Line
public CachePolicy.Line(boolean modified)
- Constructs a new
CachePolicy.Line
.
- Parameters:
modified
- indicate if line has been modified.
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)