public class FullIdentityMap extends AbstractIdentityMap
Purpose: A FullIdentityMap holds all objects stored within it for the life of the application.
Responsibilities:
| Constructor and Description |
|---|
FullIdentityMap()
Used to allow subclasses to build different map type.
|
FullIdentityMap(int size,
ClassDescriptor descriptor,
AbstractSession session,
boolean isolated) |
| 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.
|
CacheKey |
getCacheKey(java.lang.Object searchKey,
boolean forMerge)
Return the cache key matching the primary key of the searchKey.
|
java.util.Map<java.lang.Object,CacheKey> |
getCacheKeys()
Return the cache keys.
|
int |
getSize()
Return the number of CacheKeys 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.
|
java.util.Enumeration |
keys(boolean checkReadLocks)
Allow for the cache keys to be iterated on.
|
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)
Store the object in the cache at its primary key.
|
java.lang.Object |
remove(CacheKey cacheKey)
Removes the CacheKey from the map.
|
void |
resetCacheKey(CacheKey key,
java.lang.Object object,
java.lang.Object writeLockValue,
long readTime)
Reset the cache key with new data.
|
acquireDeferredLock, acquireLock, acquireLockNoWait, acquireLockWithWait, acquireReadLockOnCacheKey, acquireReadLockOnCacheKeyNoWait, containsKey, createCacheKey, get, getAllCacheKeysFromIdentityMapWithEntityPK, getAllFromIdentityMapWithEntityPK, getCacheKeyForLock, getDefaultIdentityMapClass, getDescriptor, getDescriptorClass, getMaxSize, getWrapper, getWriteLockValue, release, remove, setDescriptor, setWrapper, setWriteLockValue, toString, updateMaxSizepublic FullIdentityMap()
public FullIdentityMap(int size,
ClassDescriptor descriptor,
AbstractSession session,
boolean isolated)
public java.lang.Object clone()
clone in interface IdentityMapclone in class AbstractIdentityMappublic void collectLocks(java.util.HashMap threadList)
collectLocks in interface IdentityMapcollectLocks in class AbstractIdentityMappublic java.util.Enumeration elements()
elements in interface IdentityMapelements in class AbstractIdentityMappublic CacheKey getCacheKey(java.lang.Object searchKey, boolean forMerge)
getCacheKey in interface IdentityMapgetCacheKey in class AbstractIdentityMappublic java.util.Map<java.lang.Object,CacheKey> getCacheKeys()
public int getSize()
getSize in interface IdentityMapgetSize in class AbstractIdentityMappublic int getSize(java.lang.Class myClass,
boolean recurse)
getSize in interface IdentityMapgetSize in class AbstractIdentityMappublic java.util.Enumeration keys()
keys in interface IdentityMapkeys in class AbstractIdentityMappublic 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 IdentityMapput in class AbstractIdentityMapprimaryKey - 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(CacheKey cacheKey)
remove in interface IdentityMapremove in class AbstractIdentityMappublic void resetCacheKey(CacheKey key, java.lang.Object object, java.lang.Object writeLockValue, long readTime)
EclipseLink 2.6.3, "build v20160428-59c81c5" API Reference