Package org.apache.ojb.broker.cache

This package provides classes for caching of objects materialized from a datastore.

See:
          Description

Interface Summary
CacheFilter Implementations of this interface can be used do filter operations, checks or whatever - before the used ObjectCache implementation was called.
ObjectCache The ObjectCache stores all Objects loaded by the PersistenceBroker from a DB.
 

Class Summary
AbstractMetaCache An abstract 'meta' implementation of the ObjectCache interace.
CacheDistributor A intern used AbstractMetaCache implementation acting as distributor of ObjectCache implementations declared in configuration metadata.
CacheFilterClassImpl A CacheFilter implementation for filtering objects before cached, using custom attribute cacheable in class-descriptor in repository file.
CacheFilterPackageImpl A CacheFilter implementation for filtering objects before cached when the given objects package name match a given package, defined as custom attribute within the descriptor-repository element or jdbc-connection-descriptor in the repository file.
CacheFilterRegistry This Meta-ObjectCache implementation enabled the CacheFilter feature support.
InternalCache A wrapper class for ObjectCache implementation.
JCSHelper Helper class to support turbine-JCS.
ObjectCacheDefaultImpl This global ObjectCache stores all Objects loaded by the PersistenceBroker from a DB using a static Map.
ObjectCacheEmptyImpl This is an 'empty' ObjectCache implementation.
ObjectCacheFactory Factory for ObjectCache implementation classes.
ObjectCacheJCSImpl This local ObjectCache implementation using turbine-JCS to cache objects is primarily for intern use in conjunction with ObjectCacheJCSPerClassImpl implementation.
ObjectCacheJCSPerClassImpl A global ObjectCache implementation using a JCS region for each class.
ObjectCacheLocalDefaultImpl Simple, flexible local ObjectCache implementation using a HashMap to cache given objects.
ObjectCachePerBrokerImpl This local ObjectCache implementation allows to have dedicated caches per broker.
ObjectCachePerClassImpl Global ObjectCache implementation.
ObjectCacheSoftImpl This global ObjectCache implementation relies on JDK1.4 features like the LinkedHashMap.
ObjectCacheSoftImpl.FixSizedLinkedHashMap  
ObjectCacheUnlimitedImpl Global ObjectCache implementation.
TwoLevelCache A cache that delegates to another cache in case of misses, and maintains that second-level cache with clones.
 

Exception Summary
RuntimeCacheException  
TwoLevelCache.NoCloneMethod  
 

Package org.apache.ojb.broker.cache Description

This package provides classes for caching of objects materialized from a datastore.

class diagram:

Applications use the ObjectCacheFactory to create new ObjectCaches. These caches supply methods for storing and retrieving objects. Objects can be looked up by their identity which is represented by the class Identiy. Each implementation of ObjectCache represents a different caching strategy. Currently the following caching strategies are supported:

Patterns applied: Configurable Factory: ObjectCacheFactory is a factory for objects implementing the ObjectCache interface. Proxy, Composite: MetaObjectCacheImpl is a kind of proxy for the real object caches. (Although it is not a proxy for a single object but for all caches.)

Todo: 1. Is it possible to remove the dependency of this package on ojb.broker and ojb.broker.metadata? A cache might me useful outside of OJB. The dependency comes from using Identy and PersistenceBrokerFactory. Is Identy really necessary? We might place the burden of creating a Identy on the class which wants to cache objects (simply by removing the method cache(Object)). Removing the dependency on Identy removes the dependency on ClassNotPersistenceCapableException as well since this exception is thrown in the constructor of Identy.



Authors: Thomas Mahler and others. (C) 2000 - 2003 Apache Software Foundation
All rights reserved. Published under the Apache License.
http://db.apache.org/ojb
Version: 1.0.rc5, 2003-12-14