org.enhydra.shark.caching
Class LRUCacheMgr

java.lang.Object
  extended by org.enhydra.shark.caching.LRUCacheMgr
All Implemented Interfaces:
CacheMgr

public class LRUCacheMgr
extends java.lang.Object
implements CacheMgr

This class creates and manages process cache and recource caches. These caches are LRU (least recently used mechanism) caches.

Author:
Sasa Bojanic, Tanja Jovanovic

Field Summary
protected  ProcessCache processes
           
protected  ResourceCache resources
           
 
Constructor Summary
LRUCacheMgr()
           
 
Method Summary
 void configure(CallbackUtilities cus)
          Configures caches.
 ProcessCache getProcessCache()
          Returns process cache.
 ResourceCache getResourceCache()
          Returns resource cache.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

processes

protected ProcessCache processes

resources

protected ResourceCache resources
Constructor Detail

LRUCacheMgr

public LRUCacheMgr()
Method Detail

configure

public void configure(CallbackUtilities cus)
               throws java.lang.Exception
Configures caches.

Specified by:
configure in interface CacheMgr
Parameters:
cus - an instance of CallbackUtilities used to get properties for configuring caches.
Throws:
java.lang.Exception - Thrown if an error occurs.

getProcessCache

public ProcessCache getProcessCache()
Returns process cache.

Specified by:
getProcessCache in interface CacheMgr
Returns:
process cache.

getResourceCache

public ResourceCache getResourceCache()
Returns resource cache.

Specified by:
getResourceCache in interface CacheMgr
Returns:
resource cache.