public interface ObjectCacheInternal extends ObjectCache
ObjectCache
.Modifier and Type | Field and Description |
---|---|
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_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.
|
Modifier and Type | Method and Description |
---|---|
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.
|
cache, clear, lookup, remove
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
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.(C) 2002 - 2005 Apache Software Foundation
All rights reserved. Published under the Apache License 2.0.
http://db.apache.org/ojb
Version: 1.0.4, 2005-12-30