Interface COM.ibm.jaws.services.filepobc.FilepoBC
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Interface COM.ibm.jaws.services.filepobc.FilepoBC

public interface FilepoBC
extends Object
extends BaseCollection, BaseCollectionEC, Syncable
FilepoBC is a BaseCollection that stores its Managed object's state in a file system such as in AIX, NT, OS/2, etc. Each Managed object is given a separate file that all reside in the same single directory associated with an instance of a FilepoBC Implementation.

FilepoBC is an implementation of the BaseCollectionEC interface, which means that it uses an external CacheManager (the LruCacheManager) to cache its Cached objects. A single instance of LruCacheManager can cache Cache objects for multiple instances of FilepoBC or any other BaseCollectionEC.

FilepoBCImpl is packaged as a Manageable, so that an AA can either manage it manually (as a root BaseCollection) or assemble it into a Managed whose instances are managed by another BaseCollection. FilepoBC is the interface name and FilepoBCImpl is the implementation class name.

FilepoBC is heterogeneous (ie, each of its Managed objects can have a different class. A Managed object's Manageable interface name is stored at the beginning of its file, preceeding the Managed object's EssentialData.

FilepoBC has two objects at runtime for each activated Managed object that are instances of ManagedDel and FilepoCached. An instance of ManagedDel object is a skinny object that implements the ManagedDel interface and delegates the Manageable interface methods to a FilepoBC Cached object. To avoid having to store multiple class names for these, a FilepoBCImpl expects the AA to use the following naming convention for these classes:

The interface name (eg, .Employee) is determined by the clientInterface in the creatManaged() signitures. For the createManaged() signitures that have a Manageable input parameter, the class name of the Manageable object should be this interface name with an "Impl" suffix (eg, .EmployeeImpl). A FilepoBCImpl throws an RequestedInterfaceError if this is not true.

This interface name is then remembered persistently by storing it at the beginning of the its file, preceeding the Managed object's EssentialData. A FilepoBC expects the AA to have prepared 2 additional classes using the naming convention described below. If these are not found during runtime, FilepoBC throws a FilepoBCClassNotFoundError.

The Managed object class name adds a to the interface name, where the is part of the FilepoBCImpl instance's EssentialData (eg, if the AA chose the to be "FilepoManaged", then the Managed object class would be .EmployeeFilepoManaged).

The FilepoCached object class name adds a to the interface name, where the is part of the FilepoBCImpl instance's EssentialData (eg, if the AA chose the to be "FilepoCached", then the Managed object class would be .EmployeeFilepoCached).

The and are part of the EssentialData of a FilepoBC instance. It is assigned at birth and remembered persistently per object in the Managed object file between the key and EssentialData.

For the BaseCollection createManaged() signitures, FilepoBCImpl generate a key for the client that is the String form of an int. These methods never throw an InvalidKeyError because the generated key is always unique.

Another version of FilepoBC called FilepoBCKeyInData will come later whose implementation of the BaseCollection createManaged() signitures will allow interface names to be registered along with some way to tell the BaseCollection how to get the key from the Managed object's EssentialData. In all the above cases, the key is used as the file name for the Managed object.


Method Index

 o getCleanInterval()
 o getDependentContext()
This gets this BC's dependent context.
 o getManagedClassName()
 o getManagedSuffix()
This gets the suffix that this BC appends to the end of a Managed object's interface name to get the Managed object's class name.
 o setCleanInterval(long)
This BC is not transactional, so it needs a way to determine how often activate Managed objects are saved to disk.
 o setManagedClassName(String)
For a homogeneous FilepoBC, this allows set/get of the single managed class name.

Methods

 o setCleanInterval
  public abstract void setCleanInterval(long cleanInterval)
This BC is not transactional, so it needs a way to determine how often activate Managed objects are saved to disk. To do this, it uses a time interval (in milliseconds) between when an active Managed object becomes dirty and its EssentialData is saved to files on disk. This most affects hot Managed objects, which would never be chosen as LRU victims. This clean interval in part of a FilepoBCImpl's instance's EssentialData, so it can be provided when this FilepoBCImpl instance is created. These methods allow an AA to get and set the clean interval dynamically.
 o getCleanInterval
  public abstract long getCleanInterval()
 o getDependentContext
  public abstract KeyedCollection getDependentContext()
This gets this BC's dependent context.
 o getManagedSuffix
  public abstract String getManagedSuffix()
This gets the suffix that this BC appends to the end of a Managed object's interface name to get the Managed object's class name.
 o setManagedClassName
  public abstract void setManagedClassName(String managedClassName)
For a homogeneous FilepoBC, this allows set/get of the single managed class name.
 o getManagedClassName
  public abstract String getManagedClassName()

All Packages  Class Hierarchy  This Package  Previous  Next  Index