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
public class SoftIdentityMap extends WeakIdentityMap
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
- Author:
- James Sutherland
- See Also:
- Serialized Form
-
-
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
Constructors Constructor Description SoftIdentityMap(int size, ClassDescriptor descriptor, AbstractSession session, boolean isIsolated)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CacheKey
createCacheKey(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 Detail
-
SoftIdentityMap
public SoftIdentityMap(int size, ClassDescriptor descriptor, AbstractSession session, boolean isIsolated)
-
-
Method Detail
-
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
-
-