Package org.apache.ojb.broker.cache

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

See:
          Description

Interface Summary
CacheEntry Encapsulates buffered objects.
CacheFilter  
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  
CacheFilterPackageImpl  
CacheFilterRegistry  
InternalCache A wrapper class for ObjectCache implementation.
JCSHelper  
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  
ObjectCacheSoftImpl A global ObjectCache implementation.
ObjectCacheSoftImpl.SoftHashMap Kind of map using SoftReference to store values
ObjectCacheUnlimitedImpl  
TwoLevelCache  
 

Exception Summary
RuntimeCacheException  
 

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.



(C) 2002 - 2004 Apache Software Foundation
All rights reserved. Published under the Apache License 2.0.
http://db.apache.org/ojb
Version: 1.0.0, 2004-06-25