| Modifier and Type | Field and Description |
|---|---|
| protected Map |
| Access | Constructor and Description |
|---|---|
| public | IsolatedClientSessionIdentityMapAccessor(AbstractSession session)
INTERNAL: An IdentityMapAccessor sits between the session and the identityMapManager It needs references in both directions |
| Modifier and Type | Method and Description |
|---|---|
| public CacheKey | acquireDeferredLock(Object primaryKey, Class<?> javaClass, ClassDescriptor descriptor, boolean isCacheCheckComplete)
Overrides org. |
| public CacheKey | acquireLock(Object primaryKey, Class<?> domainClass, boolean forMerge, ClassDescriptor descriptor, boolean isCacheCheckComplete)
Overrides org. |
| public CacheKey | acquireLockNoWait(Object primaryKey, Class<?> domainClass, boolean forMerge, ClassDescriptor descriptor)
Overrides org. |
| public CacheKey | acquireLockWithWait(Object primaryKey, Class<?> domainClass, boolean forMerge, ClassDescriptor descriptor, int wait)
Overrides org. |
| public CacheKey | acquireReadLockOnCacheKey(Object primaryKey, Class<?> domainClass, ClassDescriptor descriptor)
Overrides org. |
| public CacheKey | acquireReadLockOnCacheKeyNoWait(Object primaryKey, Class<?> domainClass, ClassDescriptor descriptor)
Overrides org. |
| public boolean | acquireWriteLock()
Overrides org. |
| public boolean | containsObjectInIdentityMap(Object primaryKey, Class<?> theClass, ClassDescriptor descriptor)
Overrides org. |
| public Vector | 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. Implements org. |
| 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. |
| 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. |
| 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. |
| public Vector | getClassesRegistered()
Overrides org. |
| public Object | getFromIdentityMap(Object primaryKey, Object object, Class<?> theClass, boolean shouldReturnInvalidatedObjects, ClassDescriptor descriptor)
Overrides org. |
| public Object | getFromIdentityMap(Expression selectionCriteria, Class<?> theClass, DataRecord translationRow, int valueHolderPolicy, boolean conforming, boolean shouldReturnInvalidatedObjects, ClassDescriptor descriptor)
Overrides org. |
| public Object | getFromIdentityMapWithDeferredLock(Object primaryKey, Class<?> theClass, boolean shouldReturnInvalidatedObjects, ClassDescriptor descriptor)
Overrides org. |
| public Object | getFromLocalIdentityMap(Object primaryKey, Class<?> theClass, boolean shouldReturnInvalidatedObjects, ClassDescriptor descriptor)
Overrides org. |
| public IdentityMap | getIdentityMap(ClassDescriptor descriptor, boolean returnNullIfMissing)
Overrides org. |
| public IdentityMapManager | getIdentityMapManager()
Overrides org. |
| public Object | getQueryResult(ReadQuery query, List<E> parameters, boolean checkExpiry)
Overrides org. |
| public AbstractSession | getSession()
Overrides org. |
| public Object | getWrapper(Object primaryKey, Class<?> theClass)
Overrides org. |
| public WriteLockManager | getWriteLockManager()
Overrides org. |
| public Object | getWriteLockValue(Object primaryKey, Class<?> theClass, ClassDescriptor descriptor)
Overrides org. |
| public void | initializeAllIdentityMaps()
Overrides org. Implements org. |
| public void | initializeIdentityMap(Class<?>
Class theClass)Overrides org. Implements org. |
| public void | initializeIdentityMaps()
Overrides org. Implements org. |
| public CacheKey | internalPutInIdentityMap(Object domainObject, Object key, Object writeLockValue, long readTime, ClassDescriptor descriptor)
Overrides org. |
| 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. Implements org. |
| public void | invalidateQueryCache(Class<?> classThatChanged)
Overrides org. Implements org. |
| public void | printIdentityMap(Class<?> businessClass)
Overrides org. Implements org. |
| public void | printIdentityMapLocks()
Overrides org. Implements org. |
| public void | printIdentityMaps()
Overrides org. Implements org. |
| public void | putCacheKeyByIndex(CacheIndex index, CacheId indexValues, CacheKey cacheKey, ClassDescriptor descriptor)
Overrides org. |
| public void | putQueryResult(ReadQuery query, List<E> parameters, Object results)
Overrides org. |
| public void | releaseWriteLock()
Overrides org. |
| public Object | removeFromIdentityMap(Object key, Class<?> theClass, ClassDescriptor descriptor, Object object)
Overrides org. |
| public void | setIdentityMapManager(IdentityMapManager identityMapManager)
Overrides org. |
| public void | setWrapper(Object primaryKey, Class<?> theClass, Object wrapper)
Overrides org. |
| public void | updateWriteLockValue(Object primaryKey, Class<?> theClass, Object writeLockValue)
Overrides org. Implements org. |
| objectsLockedForClone | back to summary |
|---|---|
| protected Map<K, V> objectsLockedForClone | |
| IsolatedClientSessionIdentityMapAccessor | back to summary |
|---|---|
| public IsolatedClientSessionIdentityMapAccessor(AbstractSession session) INTERNAL: An IdentityMapAccessor sits between the session and the identityMapManager It needs references in both directions | |
| acquireDeferredLock | back to summary |
|---|---|
| public CacheKey acquireDeferredLock(Object primaryKey, Class<?> javaClass, ClassDescriptor descriptor, boolean isCacheCheckComplete) Overrides org. 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
| |
| acquireLock | back to summary |
|---|---|
| public CacheKey acquireLock(Object primaryKey, Class<?> domainClass, boolean forMerge, ClassDescriptor descriptor, boolean isCacheCheckComplete) Overrides org. 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.
| |
| acquireLockNoWait | back to summary |
|---|---|
| public CacheKey acquireLockNoWait(Object primaryKey, Class<?> domainClass, boolean forMerge, ClassDescriptor descriptor) Overrides org. 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.
| |
| acquireLockWithWait | back to summary |
|---|---|
| public CacheKey acquireLockWithWait(Object primaryKey, Class<?> domainClass, boolean forMerge, ClassDescriptor descriptor, int wait) Overrides org. 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.
| |
| acquireReadLockOnCacheKey | back to summary |
|---|---|
| public CacheKey acquireReadLockOnCacheKey(Object primaryKey, Class<?> domainClass, ClassDescriptor descriptor) Overrides org. 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.
| |
| acquireReadLockOnCacheKeyNoWait | back to summary |
|---|---|
| public CacheKey acquireReadLockOnCacheKeyNoWait(Object primaryKey, Class<?> domainClass, ClassDescriptor descriptor) Overrides org. 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.
| |
| acquireWriteLock | back to summary |
|---|---|
| public boolean acquireWriteLock() Overrides org. 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.
| |
| containsObjectInIdentityMap | back to summary |
|---|---|
| public boolean containsObjectInIdentityMap(Object primaryKey, Class<?> theClass, ClassDescriptor descriptor) Overrides org. ADVANCED: Return if their is an object for the primary key.
| |
| getAllFromIdentityMap | back to summary |
|---|---|
| public Vector Overrides org. Implements org. 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.
| |
| getAndCloneCacheKeyFromParent | back to summary |
|---|---|
| protected Object getAndCloneCacheKeyFromParent(Object primaryKey, Object objectToClone, Class<?> theClass, boolean shouldReturnInvalidatedObjects, ClassDescriptor descriptor) | |
| getCacheKeyByIndex | back to summary |
|---|---|
| public CacheKey getCacheKeyByIndex(CacheIndex index, CacheId indexValues, boolean shouldCheckExpiry, ClassDescriptor descriptor) Overrides org. Return the cache key for the cache index or null if not found.
| |
| getCacheKeyForObject | back to summary |
|---|---|
| public CacheKey getCacheKeyForObject(Object primaryKey, Class<?> myClass, ClassDescriptor descriptor, boolean forMerge) Overrides org. INTERNAL: Retrieve the cache key for the given identity information. | |
| getCacheKeyForObjectForLock | back to summary |
|---|---|
| public CacheKey getCacheKeyForObjectForLock(Object primaryKey, Class<?> myClass, ClassDescriptor descriptor) Overrides org. INTERNAL: Retrieve the cache key for the given identity information. | |
| getClassesRegistered | back to summary |
|---|---|
| public Vector Overrides org. INTERNAL: This method is used to get a list of those classes with IdentityMaps in the Session.
| |
| getFromIdentityMap | back to summary |
|---|---|
| public Object getFromIdentityMap(Object primaryKey, Object object, Class<?> theClass, boolean shouldReturnInvalidatedObjects, ClassDescriptor descriptor) Overrides org. ADVANCED: Return the object from the identity with the primary and class.
| |
| getFromIdentityMap | back to summary |
|---|---|
| public Object getFromIdentityMap(Expression selectionCriteria, Class<?> theClass, DataRecord translationRow, int valueHolderPolicy, boolean conforming, boolean shouldReturnInvalidatedObjects, ClassDescriptor descriptor) Overrides org. 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.
| |
| getFromIdentityMapWithDeferredLock | back to summary |
|---|---|
| public Object getFromIdentityMapWithDeferredLock(Object primaryKey, Class<?> theClass, boolean shouldReturnInvalidatedObjects, ClassDescriptor descriptor) Overrides org. INTERNAL: Return the object from the identity with the primary and class. Only return invalidated objects if requested
| |
| getFromLocalIdentityMap | back to summary |
|---|---|
| public Object getFromLocalIdentityMap(Object primaryKey, Class<?> theClass, boolean shouldReturnInvalidatedObjects, ClassDescriptor descriptor) Overrides org. 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.
| |
| getIdentityMap | back to summary |
|---|---|
| public IdentityMap getIdentityMap(ClassDescriptor descriptor, boolean returnNullIfMissing) Overrides org. INTERNAL: Get the identity map for the given class from the IdentityMapManager
| |
| getIdentityMapManager | back to summary |
|---|---|
| public IdentityMapManager getIdentityMapManager() Overrides org. INTERNAL: Get the IdentityMapManager for this IdentityMapAccessor This method should be used for all IdentityMapManager access since it may be overridden in sub classes.
| |
| getQueryResult | back to summary |
|---|---|
| public Object getQueryResult(ReadQuery query, List<E> parameters, boolean checkExpiry) Overrides org. 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.
| |
| getSession | back to summary |
|---|---|
| public AbstractSession getSession() Overrides org. INTERNAL: get the session associated with this IdentityMapAccessor
| |
| getWrapper | back to summary |
|---|---|
| public Object getWrapper(Object primaryKey, Class<?> theClass) Overrides org. INTERNAL: Get the wrapper object from the cache key associated with the given primary key, this is used for EJB.
| |
| getWriteLockManager | back to summary |
|---|---|
| public WriteLockManager getWriteLockManager() Overrides org. INTERNAL: Returns the single write Lock manager for this session
| |
| getWriteLockValue | back to summary |
|---|---|
| public Object getWriteLockValue(Object primaryKey, Class<?> theClass, ClassDescriptor descriptor) Overrides org. ADVANCED: Extract the write lock value from the identity map.
| |
| initializeAllIdentityMaps | back to summary |
|---|---|
| public void initializeAllIdentityMaps() Overrides org. Implements org. 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.
| |
| initializeIdentityMap | back to summary |
|---|---|
| public void initializeIdentityMap(Class<?> theClass) Overrides org. Implements org. 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.
| |
| initializeIdentityMaps | back to summary |
|---|---|
| public void initializeIdentityMaps() Overrides org. Implements org. 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.
| |
| internalPutInIdentityMap | back to summary |
|---|---|
| public CacheKey internalPutInIdentityMap(Object domainObject, Object key, Object writeLockValue, long readTime, ClassDescriptor descriptor) Overrides org. 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.
| |
| invalidateObjects | back to summary |
|---|---|
| public void invalidateObjects(Expression selectionCriteria, Class<?> theClass, DataRecord translationRow, boolean shouldInvalidateOnException) Overrides org. Implements org. 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).
| |
| invalidateQueryCache | back to summary |
|---|---|
| public void invalidateQueryCache(Class<?> classThatChanged) Overrides org. Implements org. Invalidate/remove any results for the class from the query cache. This is used to invalidate the query cache on any change.
| |
| printIdentityMap | back to summary |
|---|---|
| public void printIdentityMap(Class<?> businessClass) Overrides org. Implements org. 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.
| |
| printIdentityMapLocks | back to summary |
|---|---|
| public void printIdentityMapLocks() Overrides org. Implements org. 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.
| |
| printIdentityMaps | back to summary |
|---|---|
| public void printIdentityMaps() Overrides org. Implements org. 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.
| |
| putCacheKeyByIndex | back to summary |
|---|---|
| public void putCacheKeyByIndex(CacheIndex index, CacheId indexValues, CacheKey cacheKey, ClassDescriptor descriptor) Overrides org. Index the cache key by the index values.
| |
| putQueryResult | back to summary |
|---|---|
| public void putQueryResult(ReadQuery query, List<E> parameters, Object results) Overrides org. 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.
| |
| releaseWriteLock | back to summary |
|---|---|
| public void releaseWriteLock() Overrides org. 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.
| |
| removeFromIdentityMap | back to summary |
|---|---|
| public Object removeFromIdentityMap(Object key, Class<?> theClass, ClassDescriptor descriptor, Object object) Overrides org. ADVANCED: Remove the object from the object cache.
| |
| setIdentityMapManager | back to summary |
|---|---|
| public void setIdentityMapManager(IdentityMapManager identityMapManager) Overrides org. INTERNAL: Set the IdentityMapManager for this IdentityMapAccessor
| |
| setWrapper | back to summary |
|---|---|
| public void setWrapper(Object primaryKey, Class<?> theClass, Object wrapper) Overrides org. INTERNAL: Update the wrapper object the cache key associated with the given primary key, this is used for EJB.
| |
| updateWriteLockValue | back to summary |
|---|---|
| public void updateWriteLockValue(Object primaryKey, Class<?> theClass, Object writeLockValue) Overrides org. Implements org. ADVANCED: Update the write lock value in the identity map.
| |