Module org.eclipse.persistence.core
Class SoftIdentityMap
java.lang.Object
org.eclipse.persistence.internal.identitymaps.AbstractIdentityMap
org.eclipse.persistence.internal.identitymaps.FullIdentityMap
org.eclipse.persistence.internal.identitymaps.WeakIdentityMap
org.eclipse.persistence.internal.identitymaps.SoftIdentityMap
- All Implemented Interfaces:
Serializable
,Cloneable
,IdentityMap
Purpose: A SoftIdentityMap holds all objects referenced by the application. The soft identity map is similar to the weak identity map except for the fact that it allows only garbage collects when memory is low.
Responsibilities:
- Guarantees identity.
- Allows garbage collection when memory is low.
- Since:
- TopLink 11g
- See Also:
-
Field Summary
Fields inherited from class org.eclipse.persistence.internal.identitymaps.WeakIdentityMap
cleanupCount, cleanupSize
Fields inherited from class org.eclipse.persistence.internal.identitymaps.FullIdentityMap
cacheKeys
Fields inherited from class org.eclipse.persistence.internal.identitymaps.AbstractIdentityMap
descriptor, isIsolated, maxSize, session
-
Constructor Summary
ConstructorDescriptionSoftIdentityMap
(int size, ClassDescriptor descriptor, AbstractSession session, boolean isIsolated) -
Method Summary
Modifier and TypeMethodDescriptioncreateCacheKey
(Object primaryKey, Object object, Object writeLockValue, long readTime) Create the correct type of CacheKey for this map.Methods inherited from class org.eclipse.persistence.internal.identitymaps.WeakIdentityMap
checkCleanup, cleanupDeadCacheKeys, putCacheKeyIfAbsent
Methods inherited from class org.eclipse.persistence.internal.identitymaps.FullIdentityMap
clone, cloneKeys, collectLocks, elements, getCacheKey, getCacheKeys, getSize, getSize, keys, keys, lazyRelationshipLoaded, put, remove, resetCacheKey, setCacheKeys
Methods inherited from class org.eclipse.persistence.internal.identitymaps.AbstractIdentityMap
acquireDeferredLock, acquireLock, acquireLockNoWait, acquireLockWithWait, acquireReadLockOnCacheKey, acquireReadLockOnCacheKeyNoWait, containsKey, get, getAllCacheKeysFromIdentityMapWithEntityPK, getAllFromIdentityMapWithEntityPK, getCacheKeyForLock, getCacheKeyWithReadLock, getDefaultIdentityMapClass, getDescriptor, getDescriptorClass, getMaxSize, getWrapper, getWriteLockValue, release, remove, setDescriptor, setMaxSize, setWrapper, setWriteLockValue, toString, updateMaxSize
-
Constructor Details
-
SoftIdentityMap
public SoftIdentityMap(int size, ClassDescriptor descriptor, AbstractSession session, boolean isIsolated)
-
-
Method Details
-
createCacheKey
public CacheKey createCacheKey(Object primaryKey, Object object, Object writeLockValue, long readTime) Description copied from class:AbstractIdentityMap
Create the correct type of CacheKey for this map.- Overrides:
createCacheKey
in classWeakIdentityMap
-