Top Description Fields Constructors Methods
org.eclipse.persistence.internal.identitymaps

public Class UnitOfWorkIdentityMap

extends FullIdentityMap
Class Inheritance
Known Direct Subclasses
org.eclipse.persistence.internal.identitymaps.WeakUnitOfWorkIdentityMap
Imports
java.util.*, org.eclipse.persistence.descriptors.ClassDescriptor, org.eclipse.persistence.internal.sessions.AbstractSession

Unit of work specific identity map which avoid additional overhead not required in unit of work, such as locking and synchronization.
Author
James Sutherland
Since
TopLink 10.1.3.1

Field Summary

Inherited from org.eclipse.persistence.internal.identitymaps.FullIdentityMap:
cacheKeys

Constructor Summary

AccessConstructor and Description
protected
public
UnitOfWorkIdentityMap(int size, ClassDescriptor descriptor, AbstractSession session, boolean isolated)

Method Summary

Modifier and TypeMethod and Description
public CacheKey
public CacheKey
acquireLock(Object primaryKey, boolean forMerge, boolean isCacheCheckComplete)

Overrides org.eclipse.persistence.internal.identitymaps.AbstractIdentityMap.acquireLock.

Implements org.eclipse.persistence.internal.identitymaps.IdentityMap.acquireLock.

Avoid acquiring any lock as uow is single threaded.
public CacheKey
public CacheKey
public CacheKey
public CacheKey
public CacheKey
createCacheKey(Object primaryKey, Object object, Object writeLockValue, long readTime)

Overrides org.eclipse.persistence.internal.identitymaps.AbstractIdentityMap.createCacheKey.

Create the correct type of CacheKey for this map.
protected CacheKey
protected CacheKey
putCacheKeyIfAbsent(CacheKey searchKey)

Overrides org.eclipse.persistence.internal.identitymaps.FullIdentityMap.putCacheKeyIfAbsent.

Use hashmap put, as no concurrency in unit of work.
public Object
public void
resetCacheKey(CacheKey key, Object object, Object writeLockValue, long readTime)

Overrides org.eclipse.persistence.internal.identitymaps.FullIdentityMap.resetCacheKey.

Avoid acquiring any lock as uow is single threaded.
public void
Inherited from org.eclipse.persistence.internal.identitymaps.FullIdentityMap:
clonecloneKeyscollectLockselementsgetCacheKeygetCacheKeysgetSizegetSizekeyskeyslazyRelationshipLoadedputsetCacheKeys

Constructor Detail

UnitOfWorkIdentityMapback to summary
protected UnitOfWorkIdentityMap()
UnitOfWorkIdentityMapback to summary
public UnitOfWorkIdentityMap(int size, ClassDescriptor descriptor, AbstractSession session, boolean isolated)

Method Detail

acquireDeferredLockback to summary
public CacheKey acquireDeferredLock(Object primaryKey, boolean isCacheCheckComplete)

Overrides org.eclipse.persistence.internal.identitymaps.AbstractIdentityMap.acquireDeferredLock.

Implements org.eclipse.persistence.internal.identitymaps.IdentityMap.acquireDeferredLock.

Avoid acquiring any lock as uow is single threaded.

Annotations
@Override
acquireLockback to summary
public CacheKey acquireLock(Object primaryKey, boolean forMerge, boolean isCacheCheckComplete)

Overrides org.eclipse.persistence.internal.identitymaps.AbstractIdentityMap.acquireLock.

Implements org.eclipse.persistence.internal.identitymaps.IdentityMap.acquireLock.

Avoid acquiring any lock as uow is single threaded.

Annotations
@Override
acquireLockNoWaitback to summary
public CacheKey acquireLockNoWait(Object primaryKey, boolean forMerge)

Overrides org.eclipse.persistence.internal.identitymaps.AbstractIdentityMap.acquireLockNoWait.

Implements org.eclipse.persistence.internal.identitymaps.IdentityMap.acquireLockNoWait.

Avoid acquiring any lock as uow is single threaded.

Annotations
@Override
acquireLockWithWaitback to summary
public CacheKey acquireLockWithWait(Object primaryKey, boolean forMerge, int wait)

Overrides org.eclipse.persistence.internal.identitymaps.AbstractIdentityMap.acquireLockWithWait.

Implements org.eclipse.persistence.internal.identitymaps.IdentityMap.acquireLockWithWait.

Avoid acquiring any lock as uow is single threaded.

Annotations
@Override
acquireReadLockOnCacheKeyback to summary
public CacheKey acquireReadLockOnCacheKey(Object primaryKey)

Overrides org.eclipse.persistence.internal.identitymaps.AbstractIdentityMap.acquireReadLockOnCacheKey.

Implements org.eclipse.persistence.internal.identitymaps.IdentityMap.acquireReadLockOnCacheKey.

Avoid acquiring any lock as uow is single threaded.

Annotations
@Override
acquireReadLockOnCacheKeyNoWaitback to summary
public CacheKey acquireReadLockOnCacheKeyNoWait(Object primaryKey)

Overrides org.eclipse.persistence.internal.identitymaps.AbstractIdentityMap.acquireReadLockOnCacheKeyNoWait.

Implements org.eclipse.persistence.internal.identitymaps.IdentityMap.acquireReadLockOnCacheKeyNoWait.

Avoid acquiring any lock as uow is single threaded.

Annotations
@Override
createCacheKeyback to summary
public CacheKey createCacheKey(Object primaryKey, Object object, Object writeLockValue, long readTime)

Overrides org.eclipse.persistence.internal.identitymaps.AbstractIdentityMap.createCacheKey.

Doc from org.eclipse.persistence.internal.identitymaps.AbstractIdentityMap.createCacheKey.

Create the correct type of CacheKey for this map.

Annotations
@Override
getCacheKeyWithReadLockback to summary
protected CacheKey getCacheKeyWithReadLock(Object primaryKey)

Overrides org.eclipse.persistence.internal.identitymaps.AbstractIdentityMap.getCacheKeyWithReadLock.

Avoid acquiring any lock as uow is single threaded.

Annotations
@Override
putCacheKeyIfAbsentback to summary
protected CacheKey putCacheKeyIfAbsent(CacheKey searchKey)

Overrides org.eclipse.persistence.internal.identitymaps.FullIdentityMap.putCacheKeyIfAbsent.

Use hashmap put, as no concurrency in unit of work.

Annotations
@Override
removeback to summary
public Object remove(CacheKey cacheKey)

Overrides org.eclipse.persistence.internal.identitymaps.FullIdentityMap.remove.

Implements org.eclipse.persistence.internal.identitymaps.IdentityMap.remove.

Avoid acquiring any lock as uow is single threaded.

Returns:Object

Doc from org.eclipse.persistence.internal.identitymaps.FullIdentityMap.remove.

the object held within the CacheKey or null if no object cached for given cacheKey.

Annotations
@Override
resetCacheKeyback to summary
public void resetCacheKey(CacheKey key, Object object, Object writeLockValue, long readTime)

Overrides org.eclipse.persistence.internal.identitymaps.FullIdentityMap.resetCacheKey.

Avoid acquiring any lock as uow is single threaded.

Annotations
@Override
setWriteLockValueback to summary
public void setWriteLockValue(Object primaryKey, Object writeLockValue)

Overrides org.eclipse.persistence.internal.identitymaps.AbstractIdentityMap.setWriteLockValue.

Implements org.eclipse.persistence.internal.identitymaps.IdentityMap.setWriteLockValue.

Avoid acquiring any lock as uow is single threaded.

Annotations
@Override