Class COM.ibm.jaws.services.lrucmgr.LruCacheManagerImpl
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class COM.ibm.jaws.services.lrucmgr.LruCacheManagerImpl

java.lang.Object
   |
   +----COM.ibm.jaws.services.lrucmgr.LruCacheManagerImpl

public class LruCacheManagerImpl
extends Object
implements LruCacheManager
The LruCacheManagerImpl implements the LruCacheManager interface. It uses a simplified version of the standard clock algorithm to choose an LRU victim.

This LruCacheManager is packaged as a Manageable, so it can be either managed manually or by a BaseCollection. Its interface is defined by LurCacheManager. It has no dependencies (not a Dependent), and does not return a reference to itself in any of its methods (not an IdentityDelegator). It does support the Lifecycle interface to aggressively deallocate memory resources.


Variable Index

 o d

Constructor Index

 o LruCacheManagerImpl()
Simple constructor that allows newInstance() to work.
 o LruCacheManagerImpl(int)
Constructor with EssentialData.

Method Index

 o cacheEntrys()
 o cacheEntrys(BaseCollectionEC)
 o cacheObject(BaseCollectionEC, String, Manageable)
Implementation of the CacheEntry interface cacheObject().
 o externalizeToStream(OutputEDStream)
 o getEntry(BaseCollectionEC, String)
Implementation of the CacheManager interface getEntry().
 o getMaxNumberEntries()
 o getNewCacheEntry()
This method is called to get a new LruCacheEntry instance by a BaseCollectionEC that keeps the CacheEntry and Cached object as two separate objects.
 o internalizeFromStream(InputEDStream)
Implementation of this LruCacheManager's Manageable interface.
 o release()
Implementation of the Lifecycle interface.
 o remove()
 o setMaxNumberEntries(int)
 o uncacheAllObjects()
 o uncacheAllObjects(BaseCollectionEC)
 o uncacheObject(BaseCollectionEC, String)
This removes a single Cached object identified by the Cached object's BaseCollectionEC and key within that BaseCollectionEC.
 o uncacheObject(CacheEntry)
This uncaches a single Cached object identified by a CacheEntry.

Variables

 o d
  protected Debug d

Constructors

 o LruCacheManagerImpl
  public LruCacheManagerImpl()
Simple constructor that allows newInstance() to work.
 o LruCacheManagerImpl
  public LruCacheManagerImpl(int maxEntries)
Constructor with EssentialData.

Methods

 o internalizeFromStream
  public void internalizeFromStream(InputEDStream stream) throws EDStreamFormatError
Implementation of this LruCacheManager's Manageable interface.
 o externalizeToStream
  public void externalizeToStream(OutputEDStream stream)
 o release
  public void release()
Implementation of the Lifecycle interface. These methods are called by this LruCacheManagerImpl's BaseCollection during deactivation and remove() on its this LruCacheManagerImpl's Managed object.
 o remove
  public void remove()
 o getNewCacheEntry
  public CacheEntry getNewCacheEntry()
This method is called to get a new LruCacheEntry instance by a BaseCollectionEC that keeps the CacheEntry and Cached object as two separate objects. Otherwise, the Cached object supports the CacheEntry interface directly.
 o cacheObject
  public CacheEntry cacheObject(BaseCollectionEC bc,
                                String key,
                                Manageable co)
Implementation of the CacheEntry interface cacheObject(). This adds an entry to the cache if the object with the specified key is not already there.
 o getEntry
  public CacheEntry getEntry(BaseCollectionEC bc,
                             String key)
Implementation of the CacheManager interface getEntry(). This returns the entry for the Cached object if it is cached. It returns null if it is not cached.
 o uncacheObject
  public void uncacheObject(CacheEntry entry)
This uncaches a single Cached object identified by a CacheEntry.
 o uncacheObject
  public CacheEntry uncacheObject(BaseCollectionEC bc,
                                  String key)
This removes a single Cached object identified by the Cached object's BaseCollectionEC and key within that BaseCollectionEC.
 o uncacheAllObjects
  public void uncacheAllObjects()
 o uncacheAllObjects
  public void uncacheAllObjects(BaseCollectionEC uncacheBC)
 o setMaxNumberEntries
  public void setMaxNumberEntries(int newMaxNumberEntries)
 o getMaxNumberEntries
  public int getMaxNumberEntries()
 o cacheEntrys
  public Enumeration cacheEntrys()
 o cacheEntrys
  public Enumeration cacheEntrys(BaseCollectionEC bc)

All Packages  Class Hierarchy  This Package  Previous  Next  Index