org.apache.ojb.broker.cache
Class CacheFilterRegistry

java.lang.Object
  extended byorg.apache.ojb.broker.cache.AbstractMetaCache
      extended byorg.apache.ojb.broker.cache.CacheFilterRegistry
All Implemented Interfaces:
ObjectCache

public class CacheFilterRegistry
extends AbstractMetaCache

This Meta-ObjectCache implementation enabled the CacheFilter feature support.
With the addCacheFilter(org.apache.ojb.broker.cache.CacheFilter) method CacheFilter could be add.

Note: Using this meta cache will affect the cache performance, thus do not add too many CacheFilter.

Version:
$Id: CacheFilterRegistry.java,v 1.1 2003/03/05 23:52:09 arminw Exp $
Author:
Armin Waibel

Field Summary
 
Fields inherited from class org.apache.ojb.broker.cache.AbstractMetaCache
METHOD_CACHE, METHOD_LOOKUP, METHOD_REMOVE
 
Constructor Summary
CacheFilterRegistry(ObjectCache realCache)
           
 
Method Summary
protected  void addCacheFilter(CacheFilter filter)
          Add a CacheFilter.
 void clear()
          clear the ObjectCache.
 ObjectCache getCache(Identity oid, java.lang.Object obj, int callingMethod)
          This method handle all calls against the ObjectCache interface.
 java.lang.String toString()
           
 
Methods inherited from class org.apache.ojb.broker.cache.AbstractMetaCache
cache, lookup, remove
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CacheFilterRegistry

public CacheFilterRegistry(ObjectCache realCache)
Method Detail

addCacheFilter

protected void addCacheFilter(CacheFilter filter)
Add a CacheFilter.


getCache

public ObjectCache getCache(Identity oid,
                            java.lang.Object obj,
                            int callingMethod)
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.
callingMethod - 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()
Description copied from interface: ObjectCache
clear the ObjectCache.


toString

public java.lang.String toString()


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