|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Internal used extension of the ObjectCache
.
Field Summary | |
static int |
TYPE_CACHED_READ
Object was read from a cache entity (e.g. |
static int |
TYPE_NEW_MATERIALIZED
Object was new materialized from persistence storage. |
static int |
TYPE_UNKNOWN
Object caching type was unkown. |
static int |
TYPE_WRITE
Object was update or insert. |
Method Summary | |
boolean |
cacheIfNew(Identity oid,
java.lang.Object obj)
For internal use within ObjectCache implementations or to build two-level caches. |
void |
doInternalCache(Identity oid,
java.lang.Object obj,
int type)
For internal use. |
Methods inherited from interface org.apache.ojb.broker.cache.ObjectCache |
cache, clear, lookup, remove |
Field Detail |
public static final int TYPE_WRITE
public static final int TYPE_CACHED_READ
public static final int TYPE_NEW_MATERIALIZED
public static final int TYPE_UNKNOWN
Method Detail |
public void doInternalCache(Identity oid, java.lang.Object obj, int type)
public boolean cacheIfNew(Identity oid, java.lang.Object obj)
Used to cache new objects (not already cached) by it's
Identity
. This method was used to
cache new materialized objects and should work as a "atomic" method
(the check and the put of the object should be atomic) to avoid
concurrency problems.
Currently it's not mandatory that all ObjectCache implementations
support this method, so in some cases it's allowed to delegate this
method call to the standard cache
.
oid
- Identity of the object to cache.obj
- The object to cache.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |