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(Vector primaryKey)
locking for no identity.
|
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.
|
Object |
get(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(Class myClass,
boolean recurse)
Return the number of actual objects of type myClass in the IdentityMap.
|
Object |
getWriteLockValue(Vector primaryKey)
Get the write lock value from the cache key associated to the primarykey
|
Enumeration |
keys()
Allow for the cache keys to be iterated on.
|
void |
put(CacheKey key)
DO NOTHING
|
CacheKey |
put(Vector aVector,
Object object,
Object writeLockValue,
long readTime)
DO NOTHING.
|
Object |
remove(CacheKey searchKey)
Do Nothing
Return null, since no objects are cached.
|
Object |
remove(Vector primaryKey)
Do Nothing.
|
void |
setWriteLockValue(Vector primaryKey,
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, updateMaxSize
public void collectLocks(HashMap threadList)
collectLocks
in class IdentityMap
public Enumeration elements()
elements
in class IdentityMap
public Object get(Vector primaryKey)
get
in class IdentityMap
protected CacheKey getCacheKey(CacheKey searchKey)
getCacheKey
in class IdentityMap
public int getSize()
IdentityMap
getSize
in class IdentityMap
public int getSize(Class myClass, boolean recurse)
getSize
in class IdentityMap
public Object getWriteLockValue(Vector primaryKey)
getWriteLockValue
in class IdentityMap
public Enumeration keys()
keys
in class IdentityMap
public CacheKey put(Vector aVector, Object object, Object writeLockValue, long readTime)
put
in class IdentityMap
aVector
- 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 IdentityMap
public Object remove(Vector primaryKey)
remove
in class IdentityMap
public Object remove(CacheKey searchKey)
remove
in class IdentityMap
public void setWriteLockValue(Vector primaryKey, Object writeLockValue)
IdentityMap
setWriteLockValue
in class IdentityMap
Copyright © 2021. All rights reserved.