ostore.cache
Class ClockAlgorithm

java.lang.Object
  |
  +--ostore.cache.ClockAlgorithm
All Implemented Interfaces:
CachePolicy

public class ClockAlgorithm
extends Object
implements CachePolicy


Nested Class Summary
 
Nested classes inherited from class ostore.cache.CachePolicy
CachePolicy.Line
 
Field Summary
protected  CachePolicy.Line _next_victim
           
protected  int _size
           
static boolean DEBUG
           
static String tag
           
 
Constructor Summary
ClockAlgorithm()
           
 
Method Summary
 boolean empty()
          Are there any lines in here?
 void insert(CachePolicy.Line value)
          Insert into loop and return pointer.
static void main(String[] args)
           
 void remove(CachePolicy.Line value)
          Manually remove a line.
 CachePolicy.Line select_victim(boolean modified_ok)
          Select the most appropriate line to remove.
 int size()
          How many lines are in here?
 String toString()
          Print out contents.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEBUG

public static final boolean DEBUG
See Also:
Constant Field Values

tag

public static final String tag
See Also:
Constant Field Values

_next_victim

protected CachePolicy.Line _next_victim

_size

protected int _size
Constructor Detail

ClockAlgorithm

public ClockAlgorithm()
Method Detail

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