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.
-
d
-
-
LruCacheManagerImpl()
-
Simple constructor that allows newInstance() to work.
-
LruCacheManagerImpl(int)
-
Constructor with EssentialData.
-
cacheEntrys()
-
-
cacheEntrys(BaseCollectionEC)
-
-
cacheObject(BaseCollectionEC, String, Manageable)
- Implementation of the CacheEntry interface cacheObject().
-
externalizeToStream(OutputEDStream)
-
-
getEntry(BaseCollectionEC, String)
- Implementation of the CacheManager interface getEntry().
-
getMaxNumberEntries()
-
-
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.
-
internalizeFromStream(InputEDStream)
- Implementation of this LruCacheManager's Manageable interface.
-
release()
- Implementation of the Lifecycle interface.
-
remove()
-
-
setMaxNumberEntries(int)
-
-
uncacheAllObjects()
-
-
uncacheAllObjects(BaseCollectionEC)
-
-
uncacheObject(BaseCollectionEC, String)
- This removes a single Cached object identified by the Cached
object's BaseCollectionEC and key within that BaseCollectionEC.
-
uncacheObject(CacheEntry)
- This uncaches a single Cached object identified by a CacheEntry.
d
protected Debug d
LruCacheManagerImpl
public LruCacheManagerImpl()
- Simple constructor that allows newInstance() to work.
LruCacheManagerImpl
public LruCacheManagerImpl(int maxEntries)
- Constructor with EssentialData.
internalizeFromStream
public void internalizeFromStream(InputEDStream stream) throws EDStreamFormatError
- Implementation of this LruCacheManager's Manageable interface.
externalizeToStream
public void externalizeToStream(OutputEDStream stream)
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.
remove
public void remove()
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.
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.
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.
uncacheObject
public void uncacheObject(CacheEntry entry)
- This uncaches a single Cached object identified by a CacheEntry.
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.
uncacheAllObjects
public void uncacheAllObjects()
uncacheAllObjects
public void uncacheAllObjects(BaseCollectionEC uncacheBC)
setMaxNumberEntries
public void setMaxNumberEntries(int newMaxNumberEntries)
getMaxNumberEntries
public int getMaxNumberEntries()
cacheEntrys
public Enumeration cacheEntrys()
cacheEntrys
public Enumeration cacheEntrys(BaseCollectionEC bc)
All Packages Class Hierarchy This Package Previous Next Index