org.apache.ojb.broker.cache
Class ObjectCacheJCSPerClassImpl
java.lang.Object
org.apache.ojb.broker.cache.AbstractMetaCache
org.apache.ojb.broker.cache.ObjectCacheJCSPerClassImpl
- All Implemented Interfaces:
- ObjectCache
public class ObjectCacheJCSPerClassImpl
- extends AbstractMetaCache
A global ObjectCache
implementation using a JCS region for
each class. Each class name was associated with a dedicated
ObjectCacheJCSImpl
instance to cache given objects.
This allows to define JCS cache region configuration properties
for each used class in JCS configuration files.
More info see
turbine-JCS.
Implementation configuration properties:
Property Key |
Property Values |
- |
-
|
- Version:
- $Id: ObjectCacheJCSPerClassImpl.java,v 1.1 2007-08-24 22:17:29 ewestfal Exp $
- Author:
- Matthew Baird (mattbaird@yahoo.com), Armin Waibel
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
cachesByClass
private static Map cachesByClass
ObjectCacheJCSPerClassImpl
public ObjectCacheJCSPerClassImpl(PersistenceBroker broker,
Properties prop)
- Constructor for the MetaObjectCachePerClassImpl object
getCache
public ObjectCache getCache(Identity oid,
Object obj,
int methodCall)
- Description copied from class:
AbstractMetaCache
- This method handle all calls against the
ObjectCache
interface.
Note: The parameter obj
can be null
- e.g. when
lookup or remove method was called.
- Specified by:
getCache
in class AbstractMetaCache
- Parameters:
oid
- Identity of the target object.obj
- The target object itself or null
if not available.methodCall
- Specifies the type of method call against the ObjectCache
interface. AbstractMetaCache.METHOD_CACHE
, AbstractMetaCache.METHOD_LOOKUP
, AbstractMetaCache.METHOD_REMOVE
.
- Returns:
- The
ObjectCache
implementation.
clear
public void clear()
- Clears the cache
getCachePerClass
private ObjectCache getCachePerClass(Class objectClass,
int methodCall)
- Gets the cache for the given class
- Parameters:
objectClass
- The class to look up the cache for
- Returns:
- The cache
Copyright © 2007-2012 The Kuali Foundation. All Rights Reserved.