public class NoIdentityMap extends AbstractIdentityMap
Purpose: Provide the capability to not cache objects at all.
Responsibilities:
Constructor and Description |
---|
NoIdentityMap(int size,
ClassDescriptor descriptor,
AbstractSession session,
boolean isolated) |
Modifier and Type | Method and Description |
---|---|
void |
collectLocks(java.util.HashMap threadList)
NoIdentityMap has no locks.
|
java.util.Enumeration |
elements()
Return an empty enumerator.
|
java.lang.Object |
get(java.lang.Object primaryKey)
Return null as no objects are cached.
|
CacheKey |
getCacheKey(java.lang.Object searchKey,
boolean forMerge)
Return null as no objects are cached.
|
int |
getSize()
Return 0 as no objects are cached.
|
int |
getSize(java.lang.Class myClass,
boolean recurse)
Return 0 as no objects are cached.
|
java.lang.Object |
getWriteLockValue(java.lang.Object primaryKey)
Return null as no objects are cached.
|
java.util.Enumeration |
keys()
Return an empty enumerator.
|
java.util.Enumeration |
keys(boolean checkReadLocks)
Return an empty enumerator.
|
void |
lazyRelationshipLoaded(java.lang.Object object,
ValueHolderInterface valueHolder,
ForeignReferenceMapping mapping)
Notify the cache that a lazy relationship has been triggered in the object
and the cache may need to be updated
|
CacheKey |
put(java.lang.Object primaryKey,
java.lang.Object object,
java.lang.Object writeLockValue,
long readTime)
Do Nothing.
|
java.lang.Object |
remove(CacheKey searchKey)
Do Nothing.
|
java.lang.Object |
remove(java.lang.Object primaryKey,
java.lang.Object object)
Do Nothing.
|
void |
setWriteLockValue(java.lang.Object primaryKey,
java.lang.Object writeLockValue)
Do Nothing.
|
acquireDeferredLock, acquireLock, acquireLockNoWait, acquireLockWithWait, acquireReadLockOnCacheKey, acquireReadLockOnCacheKeyNoWait, clone, containsKey, createCacheKey, getAllCacheKeysFromIdentityMapWithEntityPK, getAllFromIdentityMapWithEntityPK, getCacheKeyForLock, getDefaultIdentityMapClass, getDescriptor, getDescriptorClass, getMaxSize, getWrapper, release, setDescriptor, setWrapper, toString, updateMaxSize
public NoIdentityMap(int size, ClassDescriptor descriptor, AbstractSession session, boolean isolated)
public void collectLocks(java.util.HashMap threadList)
collectLocks
in interface IdentityMap
collectLocks
in class AbstractIdentityMap
public java.util.Enumeration elements()
elements
in interface IdentityMap
elements
in class AbstractIdentityMap
public java.lang.Object get(java.lang.Object primaryKey)
get
in interface IdentityMap
get
in class AbstractIdentityMap
public CacheKey getCacheKey(java.lang.Object searchKey, boolean forMerge)
getCacheKey
in interface IdentityMap
getCacheKey
in class AbstractIdentityMap
public int getSize()
getSize
in interface IdentityMap
getSize
in class AbstractIdentityMap
public int getSize(java.lang.Class myClass, boolean recurse)
getSize
in interface IdentityMap
getSize
in class AbstractIdentityMap
public java.lang.Object getWriteLockValue(java.lang.Object primaryKey)
getWriteLockValue
in interface IdentityMap
getWriteLockValue
in class AbstractIdentityMap
public java.util.Enumeration keys()
keys
in interface IdentityMap
keys
in class AbstractIdentityMap
public java.util.Enumeration keys(boolean checkReadLocks)
checkReadLocks
- - true if readLocks should be checked, false otherwise.public void lazyRelationshipLoaded(java.lang.Object object, ValueHolderInterface valueHolder, ForeignReferenceMapping mapping)
public CacheKey put(java.lang.Object primaryKey, java.lang.Object object, java.lang.Object writeLockValue, long readTime)
put
in interface IdentityMap
put
in class AbstractIdentityMap
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.public java.lang.Object remove(java.lang.Object primaryKey, java.lang.Object object)
remove
in interface IdentityMap
remove
in class AbstractIdentityMap
public java.lang.Object remove(CacheKey searchKey)
remove
in interface IdentityMap
remove
in class AbstractIdentityMap
public void setWriteLockValue(java.lang.Object primaryKey, java.lang.Object writeLockValue)
setWriteLockValue
in interface IdentityMap
setWriteLockValue
in class AbstractIdentityMap
EclipseLink 2.6.3, "build v20160428-59c81c5" API Reference