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 Hashtable |
cacheKeys
Hashtable of CacheKeys stored using their key
|
maxSize, searchKey
Constructor and Description |
---|
FullIdentityMap(int size) |
Modifier and Type | Method and Description |
---|---|
Object |
clone()
INTERNAL:
Clones itself.
|
void |
collectLocks(HashMap threadList)
INTERNAL:
Used to print all the Locks in every identity map in this session.
|
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.
|
Hashtable |
getCacheKeys() |
int |
getSize()
Return the number of objects in the IdentityMap.
|
int |
getSize(Class myClass,
boolean recurse)
Return the number of actual objects of type myClass in the IdentityMap.
|
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(Vector primaryKey,
Object object,
Object writeLockValue,
long readTime)
Store the object in the cache at its primary key.
|
Object |
remove(CacheKey cacheKey)
Removes the CacheKey from the Hashtable.
|
void |
resetCacheKey(CacheKey key,
Object object,
Object writeLockValue) |
void |
resetCacheKey(CacheKey key,
Object object,
Object writeLockValue,
long readTime) |
protected void |
setCacheKeys(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, updateMaxSize
protected Hashtable cacheKeys
public Object clone()
clone
in class IdentityMap
public void collectLocks(HashMap threadList)
collectLocks
in class IdentityMap
public Enumeration elements()
elements
in class IdentityMap
protected CacheKey getCacheKey(CacheKey searchKey)
getCacheKey
in class IdentityMap
public Hashtable getCacheKeys()
public int getSize()
getSize
in class IdentityMap
public int getSize(Class myClass, boolean recurse)
getSize
in class IdentityMap
public Enumeration keys()
keys
in class IdentityMap
public CacheKey put(Vector primaryKey, Object object, Object writeLockValue, long readTime)
put
in class IdentityMap
primaryKey
- 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 IdentityMap
public Object remove(CacheKey cacheKey)
remove
in class IdentityMap
public void resetCacheKey(CacheKey key, Object object, Object writeLockValue, long readTime)
protected void setCacheKeys(Hashtable cacheKeys)
Copyright © 2023. All rights reserved.