|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.ojb.broker.cache.CacheFilterPackageImpl
A CacheFilter
implementation for filtering objects
before cached when the given objects package name match a
given package, defined as custom attribute within the
descriptor-repository
element or
jdbc-connection-descriptor
in the repository file.
Example:
Add this custom attribute to a jdbc-connection-descriptor
to avoid caching of package trees for the described connection.
<attribute attribute-name="exclude-packages" attribute-value="org.my.test,org.my.admin"/>To enable a global exclude of caching, add the custom attribute entry under the
descriptor-repository
element.
Field Summary | |
static java.lang.String |
EXCLUDE_PACKAGES
|
Constructor Summary | |
CacheFilterPackageImpl(PersistenceBroker broker,
ObjectCache cache)
|
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. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String EXCLUDE_PACKAGES
Constructor Detail |
public CacheFilterPackageImpl(PersistenceBroker broker, ObjectCache cache)
Method Detail |
public boolean beforeCache(Identity oid, java.lang.Object obj)
CacheFilter
false
was returned the object was not put in cache.
beforeCache
in interface CacheFilter
public boolean beforeLookup(Identity oid)
CacheFilter
false
was returned the object was not looked up in cache.
beforeLookup
in interface CacheFilter
public boolean beforeRemove(Identity oid)
CacheFilter
false
was returned the object was not removed from in cache.
beforeRemove
in interface CacheFilter
public ObjectCache getObjectCache()
CacheFilter
ObjectCache
implemenation.
getObjectCache
in interface CacheFilter
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |