org.apache.ojb.broker.cache
Interface CacheFilter

All Known Implementing Classes:
CacheFilterClassImpl, CacheFilterPackageImpl

public interface CacheFilter

Implementations of this interface can be used do filter operations, checks or whatever - before the used ObjectCache implementation was called.
Note: All implemenation classes need a constructor with PersistenceBroker + ObjectCache parameter.

Version:
$Id: CacheFilter.java,v 1.2 2003/09/17 23:00:15 arminw Exp $
Author:
Armin Waibel

Method Summary
 boolean beforeCache(Identity oid, java.lang.Object obj)
          Called before an object was put in cache - If false was returned the object was not put in cache.
 boolean beforeLookup(Identity oid)
          Called before an object was looked up in cache - If false was returned the object was not looked up in cache.
 boolean beforeRemove(Identity oid)
          Called before an object was removed from cache - If false was returned the object was not removed from in cache.
 ObjectCache getObjectCache()
          Returns the underlying ObjectCache implemenation.
 

Method Detail

beforeCache

public boolean beforeCache(Identity oid,
                           java.lang.Object obj)
Called before an object was put in cache - If false was returned the object was not put in cache.


beforeLookup

public boolean beforeLookup(Identity oid)
Called before an object was looked up in cache - If false was returned the object was not looked up in cache.


beforeRemove

public boolean beforeRemove(Identity oid)
Called before an object was removed from cache - If false was returned the object was not removed from in cache.


getObjectCache

public ObjectCache getObjectCache()
Returns the underlying ObjectCache implemenation.



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