Interface COM.ibm.jaws.services.bcfw.CacheEntry
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Interface COM.ibm.jaws.services.bcfw.CacheEntry

public interface CacheEntry
extends Object
A CacheManager and CacheEntry implementation always go together as a pair. A CacheManager creates the CacheEntry to represent the BaseCollectionEC's Manageable object for interaction with the BC, and to store cache status information about currently cached Cached objects.

A single CacheManager class may support the case where the CacheEntry and the Cached version of the Manageable class are different objects at runtime or the case where they are the same object at runtime.

When they are the same object, the AA assembles the Cached class by extending the Manageable class with the BC's services and the CacheEntry. A BC that handles this case will new an instance of this class and provide it to the CacheManager.

When they are different objects, the AA assembles the Cached class by extending the Manageable class with only the BC's services. A BC that handles this case will ask the CacheManager for an instance of the CacheEntry.


Method Index

 o cleanedCacheEntry()
This method notifies the CacheManager that the Cached object associated with this CacheEntry has been cleaned, so that its cache status can be updated.
 o getCacheEntryAttachedManagedDel()
This method allows the BaseCollectionEC to get the single MO that is attached to the CacheEntry.
 o getCacheEntryBase()
This method allows the CacheManager to get the Cached object's BC from the CacheEntry.
 o getCacheEntryCached()
This method returns the Cached object associated with this CacheEntry.
 o getCacheEntryKey()
This method allows either the CacheManager or a BaseCollectionEC to get the Cached object's key from the CacheEntry.
 o getHoldCountCacheEntry()
 o holdCacheEntry()
When a CacheEntry is held, it cannot be chosen as a cache replacement victim.
 o setCacheEntryAttachedManagedDel(ManagedDel)
This method allows the BaseCollectionEC to set the single MO that is attached to the CacheEntry.
 o setCacheEntryBase(BaseCollection)
This method allows the BaseCollectionEC to set itself in the CacheEntry, so the CacheManager can later find out using the setBase() method to which BaseCollectionEC the Cached object belongs.
 o setCacheEntryCached(Manageable)
This method is used by the BaseCollectionEC to tell the CacheEntry which Cached object it represents.
 o setCacheEntryKey(String)
This method allows either the CacheManager or a BaseCollectionEC to set the Cached object's key in the CacheEntry.
 o unholdCacheEntry()
 o updatedCacheEntry()
This method allows the BaseCollectionEC to find out whether the object has been updated since it was cached or cleaned, so the BaseCollectionEC can know whether it needs to be written to disk.
 o usedCacheEntry(boolean)
This method notifies the CacheManager that the Cached object associated with this CacheEntry has been updated, so that its cache status can be updated.

Methods

 o setCacheEntryBase
  public abstract void setCacheEntryBase(BaseCollection base)
This method allows the BaseCollectionEC to set itself in the CacheEntry, so the CacheManager can later find out using the setBase() method to which BaseCollectionEC the Cached object belongs.
Parameters:
base - is the BaseCollection that manages the Cached object.
 o getCacheEntryBase
  public abstract BaseCollection getCacheEntryBase()
This method allows the CacheManager to get the Cached object's BC from the CacheEntry.
Returns:
is the BaseCollection that manages the Cached object represented by this CacheEntry.
 o setCacheEntryKey
  public abstract void setCacheEntryKey(String key)
This method allows either the CacheManager or a BaseCollectionEC to set the Cached object's key in the CacheEntry.
Parameters:
key - is the String Identifier of the Cached object relative to its BaseCollectionEC.
 o getCacheEntryKey
  public abstract String getCacheEntryKey()
This method allows either the CacheManager or a BaseCollectionEC to get the Cached object's key from the CacheEntry.
Returns:
is the String Identifier of the Cached object relative to its BaseCollectionEC.
 o setCacheEntryCached
  public abstract void setCacheEntryCached(Manageable cached)
This method is used by the BaseCollectionEC to tell the CacheEntry which Cached object it represents.

For BaseCollectionECs that support the separate object case (Cached object does not support the CacheEntry interface, so the CacheEntry and Cached object are separate objects at runtime), the BaseCollectionEC gets an instance of the CacheEntry from the CacheManager. For BaseCollectionECs that support the non-delegation case (Cached object does supports the CacheEntry interface, so there is one object at runtime), this method may not be used.

Parameters:
cached - is the Cached object that this CacheEntry represents.
 o getCacheEntryCached
  public abstract Manageable getCacheEntryCached()
This method returns the Cached object associated with this CacheEntry. For BaseCollectionECs that support the non-delegation case, this method would be implemented by returning "this". For BaseCollectionECs that support the delegation case, this method would be implemented by returning a reference to the separate Cached object.
Returns:
is the Cached object that this CacheEntry represents.
 o setCacheEntryAttachedManagedDel
  public abstract void setCacheEntryAttachedManagedDel(ManagedDel managed)
This method allows the BaseCollectionEC to set the single MO that is attached to the CacheEntry.
Parameters:
managed - is the single attached Managed object for this CacheEntry.
 o getCacheEntryAttachedManagedDel
  public abstract ManagedDel getCacheEntryAttachedManagedDel()
This method allows the BaseCollectionEC to get the single MO that is attached to the CacheEntry.
Returns:
is the single attached Managed object for this CacheEntry.
 o usedCacheEntry
  public abstract void usedCacheEntry(boolean updated)
This method notifies the CacheManager that the Cached object associated with this CacheEntry has been updated, so that its cache status can be updated. This is typically called by a BaseCollectionEC during createMO() or by the BaseCollectionEC's ManagedDel when during method execution.
Parameters:
updated - is a boolean indicating whether the object's usage updated the object's EssentialData.
 o cleanedCacheEntry
  public abstract void cleanedCacheEntry()
This method notifies the CacheManager that the Cached object associated with this CacheEntry has been cleaned, so that its cache status can be updated. This is typically called by a BaseCollectionEC when it has externalized the object to disk, initiated by a cleaner mechanism or a transaction commit.
 o updatedCacheEntry
  public abstract boolean updatedCacheEntry()
This method allows the BaseCollectionEC to find out whether the object has been updated since it was cached or cleaned, so the BaseCollectionEC can know whether it needs to be written to disk.
Returns:
is a boolean indicating whether the Cached object has been updated since it was last cleaned.
 o holdCacheEntry
  public abstract void holdCacheEntry()
When a CacheEntry is held, it cannot be chosen as a cache replacement victim.
 o unholdCacheEntry
  public abstract void unholdCacheEntry()
 o getHoldCountCacheEntry
  public abstract int getHoldCountCacheEntry()

All Packages  Class Hierarchy  This Package  Previous  Next  Index