KCMS CMM Developer's Guide

Derivatives

Use a KcsIO class derivative for a static store. These derivatives can be memory based, disk based, and network based. The object does not care where the information is actually stored. The KcsIO base class has a file-like interface. Loadable derivatives also use the KcsChunkSet abstraction. This provides a random access bit bucket that is built on top of the KcsIO hierarchy.

Once a loadable object is minimized (or unloaded), a derived object regenerates or reloads itself in the manner described below.

The derivation implements the unload() method to minimize the state of the object in memory. Then in the load() method, it restores the state of the object to that described by the chunkSet and iChunkId member fields of the loadable base class. If in the unloaded state, it returns an error to signal that a load() call in this state is not adequate for all methods. Additionally, for methods that need access to the state, it loads the minimum state according to the specific derivative's load hints. Then it continues the original method's functionality.

It is assumed that if hints are allowed for loading, the derivative overloads the load() method to allow the hints to be passed to its contained object's load() method.