Module org.eclipse.persistence.core
Class UnitOfWorkIdentityMap
java.lang.Object
org.eclipse.persistence.internal.identitymaps.AbstractIdentityMap
org.eclipse.persistence.internal.identitymaps.FullIdentityMap
org.eclipse.persistence.internal.identitymaps.UnitOfWorkIdentityMap
- All Implemented Interfaces:
Serializable
,Cloneable
,IdentityMap
- Direct Known Subclasses:
WeakUnitOfWorkIdentityMap
Unit of work specific identity map which avoid additional overhead not required in unit of work,
such as locking and synchronization.
- Since:
- TopLink 10.1.3.1
- See Also:
-
Field Summary
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
ConstructorsModifierConstructorDescriptionprotected
UnitOfWorkIdentityMap
(int size, ClassDescriptor descriptor, AbstractSession session, boolean isolated) -
Method Summary
Modifier and TypeMethodDescriptionacquireDeferredLock
(Object primaryKey, boolean isCacheCheckComplete) Avoid acquiring any lock as uow is single threaded.acquireLock
(Object primaryKey, boolean forMerge, boolean isCacheCheckComplete) Avoid acquiring any lock as uow is single threaded.acquireLockNoWait
(Object primaryKey, boolean forMerge) Avoid acquiring any lock as uow is single threaded.acquireLockWithWait
(Object primaryKey, boolean forMerge, int wait) Avoid acquiring any lock as uow is single threaded.acquireReadLockOnCacheKey
(Object primaryKey) Avoid acquiring any lock as uow is single threaded.acquireReadLockOnCacheKeyNoWait
(Object primaryKey) Avoid acquiring any lock as uow is single threaded.createCacheKey
(Object primaryKey, Object object, Object writeLockValue, long readTime) Create the correct type of CacheKey for this map.protected CacheKey
getCacheKeyWithReadLock
(Object primaryKey) Avoid acquiring any lock as uow is single threaded.protected CacheKey
putCacheKeyIfAbsent
(CacheKey searchKey) Use hashmap put, as no concurrency in unit of work.Avoid acquiring any lock as uow is single threaded.void
resetCacheKey
(CacheKey key, Object object, Object writeLockValue, long readTime) Avoid acquiring any lock as uow is single threaded.void
setWriteLockValue
(Object primaryKey, Object writeLockValue) Avoid acquiring any lock as uow is single threaded.Methods inherited from class org.eclipse.persistence.internal.identitymaps.FullIdentityMap
clone, cloneKeys, collectLocks, elements, getCacheKey, getCacheKeys, getSize, getSize, keys, keys, lazyRelationshipLoaded, put, setCacheKeys
Methods inherited from class org.eclipse.persistence.internal.identitymaps.AbstractIdentityMap
containsKey, get, getAllCacheKeysFromIdentityMapWithEntityPK, getAllFromIdentityMapWithEntityPK, getCacheKeyForLock, getDefaultIdentityMapClass, getDescriptor, getDescriptorClass, getMaxSize, getWrapper, getWriteLockValue, release, remove, setDescriptor, setMaxSize, setWrapper, toString, updateMaxSize
-
Constructor Details
-
UnitOfWorkIdentityMap
protected UnitOfWorkIdentityMap() -
UnitOfWorkIdentityMap
public UnitOfWorkIdentityMap(int size, ClassDescriptor descriptor, AbstractSession session, boolean isolated)
-
-
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 classAbstractIdentityMap
-
acquireDeferredLock
Avoid acquiring any lock as uow is single threaded.- Specified by:
acquireDeferredLock
in interfaceIdentityMap
- Overrides:
acquireDeferredLock
in classAbstractIdentityMap
-
acquireLock
Avoid acquiring any lock as uow is single threaded.- Specified by:
acquireLock
in interfaceIdentityMap
- Overrides:
acquireLock
in classAbstractIdentityMap
-
acquireLockNoWait
Avoid acquiring any lock as uow is single threaded.- Specified by:
acquireLockNoWait
in interfaceIdentityMap
- Overrides:
acquireLockNoWait
in classAbstractIdentityMap
-
acquireLockWithWait
Avoid acquiring any lock as uow is single threaded.- Specified by:
acquireLockWithWait
in interfaceIdentityMap
- Overrides:
acquireLockWithWait
in classAbstractIdentityMap
-
acquireReadLockOnCacheKey
Avoid acquiring any lock as uow is single threaded.- Specified by:
acquireReadLockOnCacheKey
in interfaceIdentityMap
- Overrides:
acquireReadLockOnCacheKey
in classAbstractIdentityMap
-
acquireReadLockOnCacheKeyNoWait
Avoid acquiring any lock as uow is single threaded.- Specified by:
acquireReadLockOnCacheKeyNoWait
in interfaceIdentityMap
- Overrides:
acquireReadLockOnCacheKeyNoWait
in classAbstractIdentityMap
-
getCacheKeyWithReadLock
Avoid acquiring any lock as uow is single threaded.- Overrides:
getCacheKeyWithReadLock
in classAbstractIdentityMap
-
putCacheKeyIfAbsent
Use hashmap put, as no concurrency in unit of work.- Overrides:
putCacheKeyIfAbsent
in classFullIdentityMap
-
remove
Avoid acquiring any lock as uow is single threaded.- Specified by:
remove
in interfaceIdentityMap
- Overrides:
remove
in classFullIdentityMap
- Returns:
- the object held within the CacheKey or null if no object cached for given cacheKey.
-
resetCacheKey
Avoid acquiring any lock as uow is single threaded.- Overrides:
resetCacheKey
in classFullIdentityMap
-
setWriteLockValue
Avoid acquiring any lock as uow is single threaded.- Specified by:
setWriteLockValue
in interfaceIdentityMap
- Overrides:
setWriteLockValue
in classAbstractIdentityMap
-