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

public Class IsolatedClientSessionIdentityMapAccessor

extends IdentityMapAccessor
Class Inheritance
Imports
java.util.*, org.eclipse.persistence.internal.identitymaps.*, org.eclipse.persistence.queries.*, org.eclipse.persistence.expressions.*, org.eclipse.persistence.exceptions.*, org.eclipse.persistence.descriptors.CacheIndex, .ClassDescriptor, org.eclipse.persistence.sessions.DataRecord, org.eclipse.persistence.logging.SessionLog, org.eclipse.persistence.internal.descriptors.ObjectBuilder, .PersistenceEntity, org.eclipse.persistence.internal.helper.WriteLockManager

INTERNAL: Internal subclass that provides access to identity maps through the session. Implements the IdentityMapAccessor interface which provides all publicly available identity map functionality to users. This is the main class that should be used to access identity maps. In general, any function that accesses the identity map manager should go through this class Any session specific functionality appears in subclasses

Field Summary

Modifier and TypeField and Description
protected Map<K, V>
Inherited from org.eclipse.persistence.internal.sessions.IdentityMapAccessor:
identityMapManagersession

Constructor Summary

AccessConstructor and Description
public
IsolatedClientSessionIdentityMapAccessor(AbstractSession session)

INTERNAL: An IdentityMapAccessor sits between the session and the identityMapManager It needs references in both directions

Method Summary

Modifier and TypeMethod and Description
public CacheKey
acquireDeferredLock(Object primaryKey, Class<?> javaClass, ClassDescriptor descriptor, boolean isCacheCheckComplete)

Overrides org.eclipse.persistence.internal.sessions.IdentityMapAccessor.acquireDeferredLock.

INTERNAL: Deferred lock the identity map for the object, this is used for avoiding deadlock The return cacheKey should be used to release the deferred lock
public CacheKey
acquireLock(Object primaryKey, Class<?> domainClass, boolean forMerge, ClassDescriptor descriptor, boolean isCacheCheckComplete)

Overrides org.eclipse.persistence.internal.sessions.IdentityMapAccessor.acquireLock.

INTERNAL: Provides access for setting a concurrency lock on an object in the IdentityMap.
public CacheKey
acquireLockNoWait(Object primaryKey, Class<?> domainClass, boolean forMerge, ClassDescriptor descriptor)

Overrides org.eclipse.persistence.internal.sessions.IdentityMapAccessor.acquireLockNoWait.

INTERNAL: Provides access for setting a concurrency lock on an object in the IdentityMap.
public CacheKey
acquireLockWithWait(Object primaryKey, Class<?> domainClass, boolean forMerge, ClassDescriptor descriptor, int wait)

Overrides org.eclipse.persistence.internal.sessions.IdentityMapAccessor.acquireLockWithWait.

INTERNAL: Provides access for setting a concurrency lock on an object in the IdentityMap.
public CacheKey
acquireReadLockOnCacheKey(Object primaryKey, Class<?> domainClass, ClassDescriptor descriptor)

Overrides org.eclipse.persistence.internal.sessions.IdentityMapAccessor.acquireReadLockOnCacheKey.

INTERNAL: Find the cachekey for the provided primary key and place a readlock on it.
public CacheKey
acquireReadLockOnCacheKeyNoWait(Object primaryKey, Class<?> domainClass, ClassDescriptor descriptor)

Overrides org.eclipse.persistence.internal.sessions.IdentityMapAccessor.acquireReadLockOnCacheKeyNoWait.

INTERNAL: Find the cachekey for the provided primary key and place a readlock on it.
public boolean
acquireWriteLock()

Overrides org.eclipse.persistence.internal.sessions.IdentityMapAccessor.acquireWriteLock.

INTERNAL: Lock the entire cache if the cache isolation requires.
public boolean
containsObjectInIdentityMap(Object primaryKey, Class<?> theClass, ClassDescriptor descriptor)

Overrides org.eclipse.persistence.internal.sessions.IdentityMapAccessor.containsObjectInIdentityMap.

ADVANCED: Return if their is an object for the primary key.
public Vector<E>
getAllFromIdentityMap(Expression
Expression selecting the Objects to be returned
selectionCriteria
,
Class<?>
Class to be considered
theClass
,
DataRecord
Record
translationRow
,
int valueHolderPolicy, boolean
boolean - true if only invalid Objects should be returned
shouldReturnInvalidatedObjects
)

Overrides org.eclipse.persistence.internal.sessions.IdentityMapAccessor.getAllFromIdentityMap.

Implements org.eclipse.persistence.sessions.IdentityMapAccessor.getAllFromIdentityMap.

ADVANCED: Query the cache in-memory.
protected Object
getAndCloneCacheKeyFromParent(Object primaryKey, Object objectToClone, Class<?> theClass, boolean shouldReturnInvalidatedObjects, ClassDescriptor descriptor)

public CacheKey
getCacheKeyByIndex(CacheIndex index, CacheId indexValues, boolean shouldCheckExpiry, ClassDescriptor descriptor)

Overrides org.eclipse.persistence.internal.sessions.IdentityMapAccessor.getCacheKeyByIndex.

Return the cache key for the cache index or null if not found.
public CacheKey
getCacheKeyForObject(Object
the primary key of the cache key to be retrieved.
primaryKey
,
Class<?>
the class of the cache key to be retrieved.
myClass
,
ClassDescriptor descriptor, boolean forMerge)

Overrides org.eclipse.persistence.internal.sessions.IdentityMapAccessor.getCacheKeyForObject.

INTERNAL: Retrieve the cache key for the given identity information.
public CacheKey
getCacheKeyForObjectForLock(Object
the primary key of the cache key to be retrieved.
primaryKey
,
Class<?>
the class of the cache key to be retrieved.
myClass
,
ClassDescriptor descriptor)

Overrides org.eclipse.persistence.internal.sessions.IdentityMapAccessor.getCacheKeyForObjectForLock.

INTERNAL: Retrieve the cache key for the given identity information.
public Vector<E>
getClassesRegistered()

Overrides org.eclipse.persistence.internal.sessions.IdentityMapAccessor.getClassesRegistered.

INTERNAL: This method is used to get a list of those classes with IdentityMaps in the Session.
public Object
getFromIdentityMap(Object primaryKey, Object object, Class<?> theClass, boolean shouldReturnInvalidatedObjects, ClassDescriptor descriptor)

Overrides org.eclipse.persistence.internal.sessions.IdentityMapAccessor.getFromIdentityMap.

ADVANCED: Return the object from the identity with the primary and class.
public Object
getFromIdentityMap(Expression selectionCriteria, Class<?> theClass, DataRecord translationRow, int valueHolderPolicy, boolean conforming, boolean shouldReturnInvalidatedObjects, ClassDescriptor descriptor)

Overrides org.eclipse.persistence.internal.sessions.IdentityMapAccessor.getFromIdentityMap.

INTERNAL: Query the cache in-memory.
public Object
getFromIdentityMapWithDeferredLock(Object primaryKey, Class<?> theClass, boolean shouldReturnInvalidatedObjects, ClassDescriptor descriptor)

Overrides org.eclipse.persistence.internal.sessions.IdentityMapAccessor.getFromIdentityMapWithDeferredLock.

INTERNAL: Return the object from the identity with the primary and class.
public Object
getFromLocalIdentityMap(Object primaryKey, Class<?> theClass, boolean shouldReturnInvalidatedObjects, ClassDescriptor descriptor)

Overrides org.eclipse.persistence.internal.sessions.IdentityMapAccessor.getFromLocalIdentityMap.

INTERNAL: Return the object from the local identity map with the primary and class.
public IdentityMap
getIdentityMap(ClassDescriptor descriptor, boolean returnNullIfMissing)

Overrides org.eclipse.persistence.internal.sessions.IdentityMapAccessor.getIdentityMap.

INTERNAL: Get the identity map for the given class from the IdentityMapManager
public IdentityMapManager
getIdentityMapManager()

Overrides org.eclipse.persistence.internal.sessions.IdentityMapAccessor.getIdentityMapManager.

INTERNAL: Get the IdentityMapManager for this IdentityMapAccessor This method should be used for all IdentityMapManager access since it may be overridden in sub classes.
public Object
getQueryResult(ReadQuery query, List<E> parameters, boolean checkExpiry)

Overrides org.eclipse.persistence.internal.sessions.IdentityMapAccessor.getQueryResult.

INTERNAL: Get the cached results associated with a query.
public AbstractSession
getSession()

Overrides org.eclipse.persistence.internal.sessions.IdentityMapAccessor.getSession.

INTERNAL: get the session associated with this IdentityMapAccessor
public Object
getWrapper(Object primaryKey, Class<?> theClass)

Overrides org.eclipse.persistence.internal.sessions.IdentityMapAccessor.getWrapper.

INTERNAL: Get the wrapper object from the cache key associated with the given primary key, this is used for EJB.
public WriteLockManager
getWriteLockManager()

Overrides org.eclipse.persistence.internal.sessions.IdentityMapAccessor.getWriteLockManager.

INTERNAL: Returns the single write Lock manager for this session
public Object
getWriteLockValue(Object primaryKey, Class<?> theClass, ClassDescriptor descriptor)

Overrides org.eclipse.persistence.internal.sessions.IdentityMapAccessor.getWriteLockValue.

ADVANCED: Extract the write lock value from the identity map.
public void
public void
public void
public CacheKey
internalPutInIdentityMap(Object domainObject, Object key, Object writeLockValue, long readTime, ClassDescriptor descriptor)

Overrides org.eclipse.persistence.internal.sessions.IdentityMapAccessor.internalPutInIdentityMap.

ADVANCED: Register the object with the identity map.
public void
invalidateObjects(Expression
Expression selecting the Objects to be returned
selectionCriteria
,
Class<?>
Class to be considered
theClass
,
DataRecord
Record
translationRow
,
boolean
boolean indicates weather to invalidate the object if conform threw exception.
shouldInvalidateOnException
)

Overrides org.eclipse.persistence.internal.sessions.IdentityMapAccessor.invalidateObjects.

Implements org.eclipse.persistence.sessions.IdentityMapAccessor.invalidateObjects.

ADVANCED: Queries the cache in-memory with the passed in criteria and invalidates matching Objects.
public void
public void
printIdentityMap(Class<?> businessClass)

Overrides org.eclipse.persistence.internal.sessions.IdentityMapAccessor.printIdentityMap.

Implements org.eclipse.persistence.sessions.IdentityMapAccessor.printIdentityMap.

PUBLIC: Used to print all the objects in the identity map of the passed in class.
public void
public void
public void
putCacheKeyByIndex(CacheIndex index, CacheId indexValues, CacheKey cacheKey, ClassDescriptor descriptor)

Overrides org.eclipse.persistence.internal.sessions.IdentityMapAccessor.putCacheKeyByIndex.

Index the cache key by the index values.
public void
putQueryResult(ReadQuery query, List<E> parameters, Object results)

Overrides org.eclipse.persistence.internal.sessions.IdentityMapAccessor.putQueryResult.

INTERNAL: Set the results for a query.
public void
releaseWriteLock()

Overrides org.eclipse.persistence.internal.sessions.IdentityMapAccessor.releaseWriteLock.

INTERNAL: Lock the entire cache if the cache isolation requires.
public Object
removeFromIdentityMap(Object key, Class<?> theClass, ClassDescriptor descriptor, Object object)

Overrides org.eclipse.persistence.internal.sessions.IdentityMapAccessor.removeFromIdentityMap.

ADVANCED: Remove the object from the object cache.
public void
setIdentityMapManager(IdentityMapManager identityMapManager)

Overrides org.eclipse.persistence.internal.sessions.IdentityMapAccessor.setIdentityMapManager.

INTERNAL: Set the IdentityMapManager for this IdentityMapAccessor
public void
setWrapper(Object primaryKey, Class<?> theClass, Object wrapper)

Overrides org.eclipse.persistence.internal.sessions.IdentityMapAccessor.setWrapper.

INTERNAL: Update the wrapper object the cache key associated with the given primary key, this is used for EJB.
public void
updateWriteLockValue(Object primaryKey, Class<?> theClass, Object writeLockValue)

Overrides org.eclipse.persistence.internal.sessions.IdentityMapAccessor.updateWriteLockValue.

Implements org.eclipse.persistence.sessions.IdentityMapAccessor.updateWriteLockValue.

ADVANCED: Update the write lock value in the identity map.
Inherited from org.eclipse.persistence.internal.sessions.IdentityMapAccessor:
acquireLockclearQueryCacheclearQueryCacheclearQueryCacheclearQueryCachecontainsObjectInIdentityMapcontainsObjectInIdentityMapcontainsObjectInIdentityMapextractPrimaryKeyFromRowgetAllCacheKeysFromIdentityMapWithEntityPKgetAllFromIdentityMapgetAllFromIdentityMapgetAllFromIdentityMapgetAllFromIdentityMapgetAllFromIdentityMapWithEntityPKgetCacheKeyForObjectgetCacheKeyForObjectgetFromIdentityMapgetFromIdentityMapgetFromIdentityMapgetFromIdentityMapgetFromIdentityMapgetFromIdentityMapgetFromIdentityMapgetFromIdentityMapgetFromIdentityMapgetFromIdentityMapgetFromIdentityMapgetFromIdentityMapWithDeferredLockgetFromLocalIdentityMapWithDeferredLockgetIdentityMapgetIdentityMapgetRemainingValidTimegetWriteLockValuegetWriteLockValueinvalidateAllinvalidateClassinvalidateClassinvalidateObjectinvalidateObjectinvalidateObjectinvalidateObjectinvalidateObjectinvalidateObjectinvalidateObjectsinvalidateObjectsinvalidateObjectsisValidisValidisValidputInIdentityMapputInIdentityMapputInIdentityMapputInIdentityMapputInIdentityMapremoveFromIdentityMapremoveFromIdentityMapupdateWriteLockValuevalidateCache

Field Detail

objectsLockedForCloneback to summary
protected Map<K, V> objectsLockedForClone

Constructor Detail

IsolatedClientSessionIdentityMapAccessorback to summary
public IsolatedClientSessionIdentityMapAccessor(AbstractSession session)

INTERNAL: An IdentityMapAccessor sits between the session and the identityMapManager It needs references in both directions

Method Detail

acquireDeferredLockback to summary
public CacheKey acquireDeferredLock(Object primaryKey, Class<?> javaClass, ClassDescriptor descriptor, boolean isCacheCheckComplete)

Overrides org.eclipse.persistence.internal.sessions.IdentityMapAccessor.acquireDeferredLock.

INTERNAL: Deferred lock the identity map for the object, this is used for avoiding deadlock The return cacheKey should be used to release the deferred lock

Annotations
@Override
acquireLockback to summary
public CacheKey acquireLock(Object primaryKey, Class<?> domainClass, boolean forMerge, ClassDescriptor descriptor, boolean isCacheCheckComplete)

Overrides org.eclipse.persistence.internal.sessions.IdentityMapAccessor.acquireLock.

INTERNAL: Provides access for setting a concurrency lock on an object in the IdentityMap. called with true from the merge process, if true then the refresh will not refresh the object.

Annotations
@Override
acquireLockNoWaitback to summary
public CacheKey acquireLockNoWait(Object primaryKey, Class<?> domainClass, boolean forMerge, ClassDescriptor descriptor)

Overrides org.eclipse.persistence.internal.sessions.IdentityMapAccessor.acquireLockNoWait.

INTERNAL: Provides access for setting a concurrency lock on an object in the IdentityMap. called with true from the merge process, if true then the refresh will not refresh the object.

Annotations
@Override
acquireLockWithWaitback to summary
public CacheKey acquireLockWithWait(Object primaryKey, Class<?> domainClass, boolean forMerge, ClassDescriptor descriptor, int wait)

Overrides org.eclipse.persistence.internal.sessions.IdentityMapAccessor.acquireLockWithWait.

INTERNAL: Provides access for setting a concurrency lock on an object in the IdentityMap. called with true from the merge process, if true then the refresh will not refresh the object.

Annotations
@Override
acquireReadLockOnCacheKeyback to summary
public CacheKey acquireReadLockOnCacheKey(Object primaryKey, Class<?> domainClass, ClassDescriptor descriptor)

Overrides org.eclipse.persistence.internal.sessions.IdentityMapAccessor.acquireReadLockOnCacheKey.

INTERNAL: Find the cachekey for the provided primary key and place a readlock on it. This will allow multiple users to read the same object but prevent writes to the object while the read lock is held.

Annotations
@Override
acquireReadLockOnCacheKeyNoWaitback to summary
public CacheKey acquireReadLockOnCacheKeyNoWait(Object primaryKey, Class<?> domainClass, ClassDescriptor descriptor)

Overrides org.eclipse.persistence.internal.sessions.IdentityMapAccessor.acquireReadLockOnCacheKeyNoWait.

INTERNAL: Find the cachekey for the provided primary key and place a readlock on it. This will allow multiple users to read the same object but prevent writes to the object while the read lock is held. If no readlock can be acquired then do not wait but return null.

Annotations
@Override
acquireWriteLockback to summary
public boolean acquireWriteLock()

Overrides org.eclipse.persistence.internal.sessions.IdentityMapAccessor.acquireWriteLock.

INTERNAL: Lock the entire cache if the cache isolation requires. By default concurrent reads and writes are allowed. By write, unit of work merge is meant.

Annotations
@Override
containsObjectInIdentityMapback to summary
public boolean containsObjectInIdentityMap(Object primaryKey, Class<?> theClass, ClassDescriptor descriptor)

Overrides org.eclipse.persistence.internal.sessions.IdentityMapAccessor.containsObjectInIdentityMap.

ADVANCED: Return if their is an object for the primary key.

Annotations
@Override
getAllFromIdentityMapback to summary
public Vector<E> getAllFromIdentityMap(Expression selectionCriteria, Class<?> theClass, DataRecord translationRow, int valueHolderPolicy, boolean shouldReturnInvalidatedObjects) throws QueryException

Overrides org.eclipse.persistence.internal.sessions.IdentityMapAccessor.getAllFromIdentityMap.

Implements org.eclipse.persistence.sessions.IdentityMapAccessor.getAllFromIdentityMap.

ADVANCED: Query the cache in-memory. If the expression is too complex an exception will be thrown. Only return objects that are invalid in the cache if specified.

Parameters
selectionCriteria:Expression

Doc from org.eclipse.persistence.sessions.IdentityMapAccessor.getAllFromIdentityMap.

Expression selecting the Objects to be returned

theClass:Class<?>

Doc from org.eclipse.persistence.sessions.IdentityMapAccessor.getAllFromIdentityMap.

Class to be considered

translationRow:DataRecord

Doc from org.eclipse.persistence.sessions.IdentityMapAccessor.getAllFromIdentityMap.

Record

valueHolderPolicy:int

Doc from org.eclipse.persistence.sessions.IdentityMapAccessor.getAllFromIdentityMap.

see InMemoryQueryIndirectionPolicy

shouldReturnInvalidatedObjects:boolean

Doc from org.eclipse.persistence.sessions.IdentityMapAccessor.getAllFromIdentityMap.

boolean - true if only invalid Objects should be returned

Returns:Vector<E>

Doc from org.eclipse.persistence.sessions.IdentityMapAccessor.getAllFromIdentityMap.

Vector of Objects

Annotations
@Override
getAndCloneCacheKeyFromParentback to summary
protected Object getAndCloneCacheKeyFromParent(Object primaryKey, Object objectToClone, Class<?> theClass, boolean shouldReturnInvalidatedObjects, ClassDescriptor descriptor)
getCacheKeyByIndexback to summary
public CacheKey getCacheKeyByIndex(CacheIndex index, CacheId indexValues, boolean shouldCheckExpiry, ClassDescriptor descriptor)

Overrides org.eclipse.persistence.internal.sessions.IdentityMapAccessor.getCacheKeyByIndex.

Return the cache key for the cache index or null if not found.

Annotations
@Override
getCacheKeyForObjectback to summary
public CacheKey getCacheKeyForObject(Object primaryKey, Class<?> myClass, ClassDescriptor descriptor, boolean forMerge)

Overrides org.eclipse.persistence.internal.sessions.IdentityMapAccessor.getCacheKeyForObject.

INTERNAL: Retrieve the cache key for the given identity information.

Parameters
primaryKey:Object

the primary key of the cache key to be retrieved.

myClass:Class<?>

the class of the cache key to be retrieved.

Annotations
@Override
getCacheKeyForObjectForLockback to summary
public CacheKey getCacheKeyForObjectForLock(Object primaryKey, Class<?> myClass, ClassDescriptor descriptor)

Overrides org.eclipse.persistence.internal.sessions.IdentityMapAccessor.getCacheKeyForObjectForLock.

INTERNAL: Retrieve the cache key for the given identity information.

Parameters
primaryKey:Object

the primary key of the cache key to be retrieved.

myClass:Class<?>

the class of the cache key to be retrieved.

Annotations
@Override
getClassesRegisteredback to summary
public Vector<E> getClassesRegistered()

Overrides org.eclipse.persistence.internal.sessions.IdentityMapAccessor.getClassesRegistered.

INTERNAL: This method is used to get a list of those classes with IdentityMaps in the Session.

Annotations
@Override
getFromIdentityMapback to summary
public Object getFromIdentityMap(Object primaryKey, Object object, Class<?> theClass, boolean shouldReturnInvalidatedObjects, ClassDescriptor descriptor)

Overrides org.eclipse.persistence.internal.sessions.IdentityMapAccessor.getFromIdentityMap.

ADVANCED: Return the object from the identity with the primary and class.

Annotations
@Override
getFromIdentityMapback to summary
public Object getFromIdentityMap(Expression selectionCriteria, Class<?> theClass, DataRecord translationRow, int valueHolderPolicy, boolean conforming, boolean shouldReturnInvalidatedObjects, ClassDescriptor descriptor)

Overrides org.eclipse.persistence.internal.sessions.IdentityMapAccessor.getFromIdentityMap.

INTERNAL: Query the cache in-memory. If the object is not found null is returned. If the expression is too complex an exception will be thrown.

Annotations
@Override
getFromIdentityMapWithDeferredLockback to summary
public Object getFromIdentityMapWithDeferredLock(Object primaryKey, Class<?> theClass, boolean shouldReturnInvalidatedObjects, ClassDescriptor descriptor)

Overrides org.eclipse.persistence.internal.sessions.IdentityMapAccessor.getFromIdentityMapWithDeferredLock.

INTERNAL: Return the object from the identity with the primary and class. Only return invalidated objects if requested

Annotations
@Override
getFromLocalIdentityMapback to summary
public Object getFromLocalIdentityMap(Object primaryKey, Class<?> theClass, boolean shouldReturnInvalidatedObjects, ClassDescriptor descriptor)

Overrides org.eclipse.persistence.internal.sessions.IdentityMapAccessor.getFromLocalIdentityMap.

INTERNAL: Return the object from the local identity map with the primary and class. This avoids checking the parent cache for the unit of work.

Annotations
@Override
getIdentityMapback to summary
public IdentityMap getIdentityMap(ClassDescriptor descriptor, boolean returnNullIfMissing)

Overrides org.eclipse.persistence.internal.sessions.IdentityMapAccessor.getIdentityMap.

INTERNAL: Get the identity map for the given class from the IdentityMapManager

Annotations
@Override
getIdentityMapManagerback to summary
public IdentityMapManager getIdentityMapManager()

Overrides org.eclipse.persistence.internal.sessions.IdentityMapAccessor.getIdentityMapManager.

INTERNAL: Get the IdentityMapManager for this IdentityMapAccessor This method should be used for all IdentityMapManager access since it may be overridden in sub classes.

Annotations
@Override
getQueryResultback to summary
public Object getQueryResult(ReadQuery query, List<E> parameters, boolean checkExpiry)

Overrides org.eclipse.persistence.internal.sessions.IdentityMapAccessor.getQueryResult.

INTERNAL: Get the cached results associated with a query. Results are cached by the values of the parameters to the query so different parameters will have different cached results.

Annotations
@Override
getSessionback to summary
public AbstractSession getSession()

Overrides org.eclipse.persistence.internal.sessions.IdentityMapAccessor.getSession.

INTERNAL: get the session associated with this IdentityMapAccessor

Annotations
@Override
getWrapperback to summary
public Object getWrapper(Object primaryKey, Class<?> theClass)

Overrides org.eclipse.persistence.internal.sessions.IdentityMapAccessor.getWrapper.

INTERNAL: Get the wrapper object from the cache key associated with the given primary key, this is used for EJB.

Annotations
@Override
getWriteLockManagerback to summary
public WriteLockManager getWriteLockManager()

Overrides org.eclipse.persistence.internal.sessions.IdentityMapAccessor.getWriteLockManager.

INTERNAL: Returns the single write Lock manager for this session

Annotations
@Override
getWriteLockValueback to summary
public Object getWriteLockValue(Object primaryKey, Class<?> theClass, ClassDescriptor descriptor)

Overrides org.eclipse.persistence.internal.sessions.IdentityMapAccessor.getWriteLockValue.

ADVANCED: Extract the write lock value from the identity map.

Annotations
@Override
initializeAllIdentityMapsback to summary
public void initializeAllIdentityMaps()

Overrides org.eclipse.persistence.internal.sessions.IdentityMapAccessor.initializeAllIdentityMaps.

Implements org.eclipse.persistence.sessions.IdentityMapAccessor.initializeAllIdentityMaps.

PUBLIC: Reset the entire object cache.

Note

be careful using this method. This method blows away both this session's and its parents caches, this includes the server cache or any other cache. This throws away any objects that have been read in. Extream caution should be used before doing this because object identity will no longer be maintained for any objects currently read in. This should only be called if the application knows that it no longer has references to object held in the cache.

Annotations
@Override
initializeIdentityMapback to summary
public void initializeIdentityMap(Class<?> theClass)

Overrides org.eclipse.persistence.internal.sessions.IdentityMapAccessor.initializeIdentityMap.

Implements org.eclipse.persistence.sessions.IdentityMapAccessor.initializeIdentityMap.

PUBLIC: Reset the identity map for only the instances of the class. For inheritance the user must make sure that they only use the root class. Caution must be used in doing this to ensure that the objects within the identity map are not referenced from other objects of other classes or from the application.

Parameters
theClass:Class<?>

Doc from org.eclipse.persistence.sessions.IdentityMapAccessor.initializeIdentityMap.

Class

Annotations
@Override
initializeIdentityMapsback to summary
public void initializeIdentityMaps()

Overrides org.eclipse.persistence.internal.sessions.IdentityMapAccessor.initializeIdentityMaps.

Implements org.eclipse.persistence.sessions.IdentityMapAccessor.initializeIdentityMaps.

PUBLIC: Reset the entire local object cache. This throws away any objects that have been read in. Extreme caution should be used before doing this because object identity will no longer be maintained for any objects currently read in. This should only be called if the application knows that it no longer has references to object held in the cache.

Annotations
@Override
internalPutInIdentityMapback to summary
public CacheKey internalPutInIdentityMap(Object domainObject, Object key, Object writeLockValue, long readTime, ClassDescriptor descriptor)

Overrides org.eclipse.persistence.internal.sessions.IdentityMapAccessor.internalPutInIdentityMap.

ADVANCED: Register the object with the identity map. The object must always be registered with its version number if optimistic locking is used. The readTime may also be included in the cache key as it is constructed.

Annotations
@Override
invalidateObjectsback to summary
public void invalidateObjects(Expression selectionCriteria, Class<?> theClass, DataRecord translationRow, boolean shouldInvalidateOnException)

Overrides org.eclipse.persistence.internal.sessions.IdentityMapAccessor.invalidateObjects.

Implements org.eclipse.persistence.sessions.IdentityMapAccessor.invalidateObjects.

ADVANCED: Queries the cache in-memory with the passed in criteria and invalidates matching Objects. If the expression is too complex either all or none object of theClass invalidated (depending on shouldInvalidateOnException value).

Parameters
selectionCriteria:Expression

Expression selecting the Objects to be returned

theClass:Class<?>

Class to be considered

translationRow:DataRecord

Record

shouldInvalidateOnException:boolean

boolean indicates weather to invalidate the object if conform threw exception.

Annotations
@Override
invalidateQueryCacheback to summary
public void invalidateQueryCache(Class<?> classThatChanged)

Overrides org.eclipse.persistence.internal.sessions.IdentityMapAccessor.invalidateQueryCache.

Implements org.eclipse.persistence.sessions.IdentityMapAccessor.invalidateQueryCache.

Invalidate/remove any results for the class from the query cache. This is used to invalidate the query cache on any change.

Annotations
@Override
printIdentityMapback to summary
public void printIdentityMap(Class<?> businessClass)

Overrides org.eclipse.persistence.internal.sessions.IdentityMapAccessor.printIdentityMap.

Implements org.eclipse.persistence.sessions.IdentityMapAccessor.printIdentityMap.

PUBLIC: Used to print all the objects in the identity map of the passed in class. The output of this method will be logged to this session's SessionLog at SEVERE level.

Annotations
@Override
printIdentityMapLocksback to summary
public void printIdentityMapLocks()

Overrides org.eclipse.persistence.internal.sessions.IdentityMapAccessor.printIdentityMapLocks.

Implements org.eclipse.persistence.sessions.IdentityMapAccessor.printIdentityMapLocks.

PUBLIC: Used to print all the locks in every identity map in this session. The output of this method will be logged to this session's SessionLog at FINEST level.

Annotations
@Override
printIdentityMapsback to summary
public void printIdentityMaps()

Overrides org.eclipse.persistence.internal.sessions.IdentityMapAccessor.printIdentityMaps.

Implements org.eclipse.persistence.sessions.IdentityMapAccessor.printIdentityMaps.

PUBLIC: Used to print all the objects in every identity map in this session. The output of this method will be logged to this session's SessionLog at SEVERE level.

Annotations
@Override
putCacheKeyByIndexback to summary
public void putCacheKeyByIndex(CacheIndex index, CacheId indexValues, CacheKey cacheKey, ClassDescriptor descriptor)

Overrides org.eclipse.persistence.internal.sessions.IdentityMapAccessor.putCacheKeyByIndex.

Index the cache key by the index values.

Annotations
@Override
putQueryResultback to summary
public void putQueryResult(ReadQuery query, List<E> parameters, Object results)

Overrides org.eclipse.persistence.internal.sessions.IdentityMapAccessor.putQueryResult.

INTERNAL: Set the results for a query. Query results are cached based on the parameter values provided to the query different parameter values access different caches.

Annotations
@Override
releaseWriteLockback to summary
public void releaseWriteLock()

Overrides org.eclipse.persistence.internal.sessions.IdentityMapAccessor.releaseWriteLock.

INTERNAL: Lock the entire cache if the cache isolation requires. By default concurrent reads and writes are allowed. By write, unit of work merge is meant.

Annotations
@Override
removeFromIdentityMapback to summary
public Object removeFromIdentityMap(Object key, Class<?> theClass, ClassDescriptor descriptor, Object object)

Overrides org.eclipse.persistence.internal.sessions.IdentityMapAccessor.removeFromIdentityMap.

ADVANCED: Remove the object from the object cache.

Annotations
@Override
setIdentityMapManagerback to summary
public void setIdentityMapManager(IdentityMapManager identityMapManager)

Overrides org.eclipse.persistence.internal.sessions.IdentityMapAccessor.setIdentityMapManager.

INTERNAL: Set the IdentityMapManager for this IdentityMapAccessor

Annotations
@Override
setWrapperback to summary
public void setWrapper(Object primaryKey, Class<?> theClass, Object wrapper)

Overrides org.eclipse.persistence.internal.sessions.IdentityMapAccessor.setWrapper.

INTERNAL: Update the wrapper object the cache key associated with the given primary key, this is used for EJB.

Annotations
@Override
updateWriteLockValueback to summary
public void updateWriteLockValue(Object primaryKey, Class<?> theClass, Object writeLockValue)

Overrides org.eclipse.persistence.internal.sessions.IdentityMapAccessor.updateWriteLockValue.

Implements org.eclipse.persistence.sessions.IdentityMapAccessor.updateWriteLockValue.

ADVANCED: Update the write lock value in the identity map.

Annotations
@Override