public class FullIdentityMap extends IdentityMap
Purpose: A FullIdentityMap holds all objects stored within it for the life of the application
Responsibilities:
| Modifier and Type | Field and Description |
|---|---|
protected java.util.Hashtable |
cacheKeys
Hashtable of CacheKeys stored using their key
|
maxSize, searchKey| Constructor and Description |
|---|
FullIdentityMap(int size) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
clone()
INTERNAL:
Clones itself.
|
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.
|
protected CacheKey |
getCacheKey(CacheKey searchKey)
Return the object indexed in the recevier at the cache key.
|
java.util.Hashtable |
getCacheKeys() |
int |
getSize()
Return the number of objects in the IdentityMap.
|
int |
getSize(java.lang.Class myClass,
boolean recurse)
Return the number of actual objects of type myClass in the IdentityMap.
|
java.util.Enumeration |
keys()
Allow for the cache keys to be iterated on.
|
protected void |
put(CacheKey cacheKey)
Store the object in the cache with the cache key.
|
CacheKey |
put(java.util.Vector primaryKey,
java.lang.Object object,
java.lang.Object writeLockValue,
long readTime)
Store the object in the cache at its primary key.
|
java.lang.Object |
remove(CacheKey cacheKey)
Removes the CacheKey from the Hashtable.
|
void |
resetCacheKey(CacheKey key,
java.lang.Object object,
java.lang.Object writeLockValue) |
void |
resetCacheKey(CacheKey key,
java.lang.Object object,
java.lang.Object writeLockValue,
long readTime) |
protected void |
setCacheKeys(java.util.Hashtable cacheKeys) |
acquireDeferredLock, acquireLock, acquireLockNoWait, acquireReadLockOnCacheKey, acquireReadLockOnCacheKeyNoWait, containsKey, createCacheKey, createCacheKey, get, getCacheKey, getCacheKeyWithReadLock, getDefaultIdentityMapClass, getMaxSize, getSearchKey, getWrapper, getWriteLockValue, initialize, remove, setMaxSize, setSearchKey, setWrapper, setWriteLockValue, toString, updateCacheKey, updateMaxSizeprotected java.util.Hashtable cacheKeys
public java.lang.Object clone()
clone in class IdentityMappublic void collectLocks(java.util.HashMap threadList)
collectLocks in class IdentityMappublic java.util.Enumeration elements()
elements in class IdentityMapprotected CacheKey getCacheKey(CacheKey searchKey)
getCacheKey in class IdentityMappublic java.util.Hashtable getCacheKeys()
public int getSize()
getSize in class IdentityMappublic int getSize(java.lang.Class myClass,
boolean recurse)
getSize in class IdentityMappublic java.util.Enumeration keys()
keys in class IdentityMappublic CacheKey put(java.util.Vector primaryKey, java.lang.Object object, java.lang.Object writeLockValue, long readTime)
put in class IdentityMapprimaryKey - 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 cacheprotected void put(CacheKey cacheKey)
put in class IdentityMappublic java.lang.Object remove(CacheKey cacheKey)
remove in class IdentityMappublic void resetCacheKey(CacheKey key, java.lang.Object object, java.lang.Object writeLockValue)
public void resetCacheKey(CacheKey key, java.lang.Object object, java.lang.Object writeLockValue, long readTime)
protected void setCacheKeys(java.util.Hashtable cacheKeys)