ostore.cache
Class LRUCache

java.lang.Object
  |
  +--ostore.cache.LRUCache

public class LRUCache
extends Object

This class is now just a cheesy way to get ahold of the functional interface to the buffer cache. The old LRUCache (which extended DataCache) is now called LRUCacheImpl. I admit the name of this class is now poor, given its function, but I didn't want to go changing all of the code that used it right now.

Version:
$Id: LRUCache.java,v 1.46 2003/03/01 17:06:57 hweather Exp $
Author:
Sean C. Rhea

Constructor Summary
LRUCache()
           
 
Method Summary
static DataCache getInstance(NodeId node_id)
          return an instance of the cache and initialize the database if we are not using java io.
static DataCache removeInstance(NodeId node_id)
          Deletes the cache instance corresponding to a NodeId.
static void setCacheSize(DataCache dc, int size)
          A hack; only the BTreeTest and DataObjectTest use this function.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LRUCache

public LRUCache()
Method Detail

getInstance

public static DataCache getInstance(NodeId node_id)
return an instance of the cache and initialize the database if we are not using java io.


removeInstance

public static DataCache removeInstance(NodeId node_id)
Deletes the cache instance corresponding to a NodeId. Should be called only when a node is going down and going to come up again with a new node id. Use very carefully!

Parameters:
node_id - The NodeId which parameterizes a virtual SandStorm instance.

setCacheSize

public static void setCacheSize(DataCache dc,
                                int size)
A hack; only the BTreeTest and DataObjectTest use this function.