public class NoIdentityMap extends IdentityMap
Purpose: Provide the capability to not cache objects at all.
Responsibilities:
maxSize, searchKey| Constructor and Description |
|---|
NoIdentityMap(int size) |
| Modifier and Type | Method and Description |
|---|---|
CacheKey |
acquire(java.util.Vector primaryKey)
locking for no identity.
|
void |
collectLocks(java.util.HashMap threadList)
INTERNAL:
Used to print all the Locks in every identity map in this session.
|
java.util.Enumeration |
elements()
Allow for the cache to be iterated on.
|
java.lang.Object |
get(java.util.Vector primaryKey)
Return the object cached in the identity map
Return null as no object is cached in the no IM.
|
protected CacheKey |
getCacheKey(CacheKey searchKey)
Return null since no objects are actually cached.
|
int |
getSize()
Return the number of objects in the receiver.
|
int |
getSize(java.lang.Class myClass,
boolean recurse)
Return the number of actual objects of type myClass in the IdentityMap.
|
java.lang.Object |
getWriteLockValue(java.util.Vector primaryKey)
Get the write lock value from the cache key associated to the primarykey
|
java.util.Enumeration |
keys()
Allow for the cache keys to be iterated on.
|
void |
put(CacheKey key)
DO NOTHING
|
CacheKey |
put(java.util.Vector aVector,
java.lang.Object object,
java.lang.Object writeLockValue,
long readTime)
DO NOTHING.
|
java.lang.Object |
remove(CacheKey searchKey)
Do Nothing
Return null, since no objects are cached.
|
java.lang.Object |
remove(java.util.Vector primaryKey)
Do Nothing.
|
void |
setWriteLockValue(java.util.Vector primaryKey,
java.lang.Object writeLockValue)
Update the write lock value of the cache key associated with the given primary key,
|
acquireDeferredLock, acquireLock, acquireLockNoWait, acquireReadLockOnCacheKey, acquireReadLockOnCacheKeyNoWait, clone, containsKey, createCacheKey, createCacheKey, getCacheKey, getCacheKeyWithReadLock, getDefaultIdentityMapClass, getMaxSize, getSearchKey, getWrapper, initialize, setMaxSize, setSearchKey, setWrapper, toString, updateCacheKey, updateMaxSizepublic CacheKey acquire(java.util.Vector primaryKey)
public void collectLocks(java.util.HashMap threadList)
collectLocks in class IdentityMappublic java.util.Enumeration elements()
elements in class IdentityMappublic java.lang.Object get(java.util.Vector primaryKey)
get in class IdentityMapprotected CacheKey getCacheKey(CacheKey searchKey)
getCacheKey in class IdentityMappublic int getSize()
IdentityMapgetSize in class IdentityMappublic int getSize(java.lang.Class myClass,
boolean recurse)
getSize in class IdentityMappublic java.lang.Object getWriteLockValue(java.util.Vector primaryKey)
getWriteLockValue in class IdentityMappublic java.util.Enumeration keys()
keys in class IdentityMappublic CacheKey put(java.util.Vector aVector, java.lang.Object object, java.lang.Object writeLockValue, long readTime)
put in class IdentityMapaVector - is the primary key for the object.object - is the domain object to cache.writeLockValue - is the current write lock value of object, if null the version is ignored.readTime - the read time of the object to be stored in the cachepublic void put(CacheKey key)
put in class IdentityMappublic java.lang.Object remove(java.util.Vector primaryKey)
remove in class IdentityMappublic java.lang.Object remove(CacheKey searchKey)
remove in class IdentityMappublic void setWriteLockValue(java.util.Vector primaryKey,
java.lang.Object writeLockValue)
IdentityMapsetWriteLockValue in class IdentityMap