|
||||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |
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 |
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:
PersistenceBroker
instance. The cache will be cleared on every PersistenceBroker#close()
method call (means when the broker instance was returned to pool).
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.
|
||||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |