|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--ojb.broker.cache.PermanentObjectCacheImpl
This is an implementation of the ObjectCache interface that caches all
objects in memory regardless of memory consumption.
It is not intended to be used as the main ObjectCache but only to be used
in conjunction with the MultipleObjectCacheImpl for special object classes.
It should only be used for objects which are few in number and not too big
in size but expensive to re-create from the DB.
Field Summary | |
protected java.util.Map |
cachedObjects
holds all cached object identities |
Constructor Summary | |
PermanentObjectCacheImpl()
|
Method Summary | |
void |
cache(Identity oid,
java.lang.Object obj)
Caches the given object |
void |
cache(java.lang.Object obj)
Caches the given object |
void |
clear()
Clears the cache |
java.lang.Object |
lookup(Identity oid)
Looks up the cache for an object that matches the given identity |
void |
remove(java.lang.Object obj)
Description of the Method |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.util.Map cachedObjects
Constructor Detail |
public PermanentObjectCacheImpl()
Method Detail |
public void cache(java.lang.Object obj)
cache
in interface ObjectCache
obj
- The object to cachepublic void clear()
clear
in interface ObjectCache
public void cache(Identity oid, java.lang.Object obj)
cache
in interface ObjectCache
oid
- The identity of the given object to cacheobj
- The object to cachepublic java.lang.Object lookup(Identity oid)
lookup
in interface ObjectCache
oid
- The identity of the object to look up
public void remove(java.lang.Object obj)
remove
in interface ObjectCache
obj
- Description of Parameter
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |