ostore.cache
Class ClockAlgorithm
java.lang.Object
|
+--ostore.cache.ClockAlgorithm
- All Implemented Interfaces:
- CachePolicy
- public class ClockAlgorithm
- extends Object
- implements CachePolicy
DEBUG
public static final boolean DEBUG
tag
public static final String tag
_next_victim
protected CachePolicy.Line _next_victim
_size
protected int _size
ClockAlgorithm
public ClockAlgorithm()
main
public static void main(String[] args)
size
public int size()
- Description copied from interface:
CachePolicy
- How many lines are in here?
- Specified by:
size
in interface CachePolicy
empty
public boolean empty()
- Description copied from interface:
CachePolicy
- Are there any lines in here?
- Specified by:
empty
in interface CachePolicy
insert
public void insert(CachePolicy.Line value)
- Description copied from interface:
CachePolicy
- Insert into loop and return pointer.
- Specified by:
insert
in interface CachePolicy
select_victim
public CachePolicy.Line select_victim(boolean modified_ok)
- Description copied from interface:
CachePolicy
- Select the most appropriate line to remove.
- Specified by:
select_victim
in interface CachePolicy
remove
public void remove(CachePolicy.Line value)
- Description copied from interface:
CachePolicy
- Manually remove a line.
- Specified by:
remove
in interface CachePolicy
toString
public String toString()
- Description copied from interface:
CachePolicy
- Print out contents.
- Specified by:
toString
in interface CachePolicy
- Overrides:
toString
in class Object