|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ObjectCacheInternal
Internal used extension of the ObjectCache
.
Field Summary | |
---|---|
static int |
TYPE_CACHED_READ
Object was read from a cache entity (e.g. from a second-level cache). |
static int |
TYPE_NEW_MATERIALIZED
Object was new materialized from persistence storage. |
static int |
TYPE_TEMP
Object caching type used for temporary storage of objects, these objects will never be pushed to a higher level cache. |
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 |
---|
static final int TYPE_WRITE
static final int TYPE_CACHED_READ
static final int TYPE_NEW_MATERIALIZED
static final int TYPE_UNKNOWN
static final int TYPE_TEMP
Method Detail |
---|
void doInternalCache(Identity oid, java.lang.Object obj, int type)
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 |