All Packages Class Hierarchy This Package Previous Next Index
BaseCollectionEC
(EC stands for external
cache) can delegate its cache management to a CacheManager,
simplifying the BaseCollectionEC implementation.
A CacheManager instance can be shared by multiple
BaseCollectionEC instances, improving performance
by allowing the cache space resource to be used where
most needed.
The CacheManager determines the criteria for keeping
or discarding the Cached objects. The CacheManager
keeps cache status information in a CacheEntry
,
which can either be supported directly by the Cached object
or can be a separate generic object that references
its Cached object. The BaseCollectionEC can tell the
CacheManager to uncache any of the BaseCollectionEC's
objects.
A BaseCollectionEC must be aware that it is using an external CacheManager. The CacheManager is an initialization input parameter to these BaseCollectionEC's. The BaseCollectionEC calls the CacheManager using the interface described here. The CacheManager calls the BaseCollectionEC with an interface called BaseCollectionEC to notify the BaseCollectionEC that one of its Cached object's is being discarded from the cache.
A BaseCollectionEC that supports the single-object case (ie, the Cached object supports the CachedEntry interface, so there is a single object at runtime), the BaseCollectionEC news this object. A BaseCollectionEC that supports the two-object case (ie, the Cached object does not support the CacheEntry interface, so there are two objects at runtime), the BaseCollectionEC asks the CacheManager to create a CacheEntry.
Enumeration
of all the
CacheEntry
s in this cache.
Enumeration
of all the
CacheEntry
s in this cache for Cached objects owned
by the indicated BaseCollectionEC
.
CacheEntry
s in the cache.
public abstract CacheEntry getNewCacheEntry()
CacheEntry
object.
public abstract CacheEntry cacheObject(BaseCollectionEC base, String key, Manageable cachedObject)
BaseCollectionEC
that manages the
Cached object.
String
Identifier for the
object to be cached.
CacheEntry
is returned for this entry.
It is used to notify this CacheManager about the use of the entry.
public abstract CacheEntry getEntry(BaseCollectionEC base, String key)
String
Identifier that idicates
the entry within the BaseCollectionEC.
CacheEntry
representing the Cached
object identified or null if the requested entry is not in the
cache.
public abstract void uncacheObject(CacheEntry entry)
CacheEntry
representing the
Cached object to be removed from the cache.
public abstract CacheEntry uncacheObject(BaseCollectionEC base, String key)
BaseCollectionEC
that manages the
Cached object to be removed from the cache.
public abstract void uncacheAllObjects(BaseCollectionEC base)
public abstract void uncacheAllObjects()
CacheEntry
s in the cache.
public abstract Enumeration cacheEntrys()
Enumeration
of all the
CacheEntry
s in this cache.
Enumeration
of CacheEntrys.
public abstract Enumeration cacheEntrys(BaseCollectionEC base)
Enumeration
of all the
CacheEntry
s in this cache for Cached objects owned
by the indicated BaseCollectionEC
.
BaseCollectionEC
whose
CacheEntry
s are enumerated.
This is useful during the implementation of the cleanAll()
method of the BaseCollectionEC.
Enumeration
of the
CacheEntry
s for the Cached
objects owned by the BaseCollectionEC.
All Packages Class Hierarchy This Package Previous Next Index