| Modifier and Type | Field and Description |
|---|---|
| protected IdentityMapManager | identityMapManager
This is the identity map manager for this accessor. |
| protected AbstractSession |
| Access | Constructor and Description |
|---|---|
| public | |
| public | IdentityMapAccessor(AbstractSession session)
INTERNAL: An IdentityMapAccessor sits between the session and the identityMapManager It needs references in both directions. |
| public | IdentityMapAccessor(AbstractSession session, IdentityMapManager identityMapManager)
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 primarKey, Class<?> javaClass, ClassDescriptor descriptor, boolean isCacheCheckComplete)
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 primarKey, Class<?> javaClass, ClassDescriptor descriptor, boolean isCacheCheckComplete)
INTERNAL: Lock the identity map for the object, this must be done when building objects. |
| public CacheKey | acquireLock(Object primaryKey, Class<?> domainClass, boolean forMerge, ClassDescriptor descriptor, boolean isCacheCheckComplete)
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)
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)
INTERNAL: Provides access for setting a concurrency lock on an object in the IdentityMap. |
| public CacheKey | acquireReadLockOnCacheKey(Object primaryKey, Class<?> domainClass, ClassDescriptor descriptor)
INTERNAL: Find the cachekey for the provided primary key and place a readlock on it. |
| public CacheKey | acquireReadLockOnCacheKeyNoWait(Object primaryKey, Class<?> domainClass, ClassDescriptor descriptor)
INTERNAL: Find the cachekey for the provided primary key and place a readlock on it. |
| public boolean | |
| public void | clearQueryCache()
Implements org. |
| public void | clearQueryCache(ReadQuery query)
Implements org. |
| public void | clearQueryCache(String sessionQueryName)
Implements org. |
| public void | clearQueryCache(String descriptorQueryName, Class<?> queryClass)
Implements org. |
| public boolean | containsObjectInIdentityMap(Object object)
Implements org. |
| public boolean | containsObjectInIdentityMap(Object primaryKey, Class<?> theClass)
Implements org. |
| public boolean | containsObjectInIdentityMap(Object primaryKey, Class<?> theClass, ClassDescriptor descriptor)
INTERNAL: Return if their is an object for the primary key. |
| public boolean | containsObjectInIdentityMap(DataRecord rowContainingPrimaryKey, Class<?> theClass)
Implements org. |
| protected Object | extractPrimaryKeyFromRow(DataRecord rowContainingPrimaryKey, Class<?> theClass)
INTERNAL: Extract primary key from a row. |
| public Map | Returns: Map of Entity PKs associated to the Entities that were retrievedList of Entity PKs to extract from the cache pkList, ClassDescriptor Descriptor type to be retrieved. descriptor)ADVANCED: Using a list of Entity PK this method will attempt to bulk load the entire list from the cache. |
| public Vector | getAllFromIdentityMap(Expression selectionCriteria, Class<?> theClass, DataRecord translationRow)
ADVANCED: Query the cache in-memory. |
| public Vector | getAllFromIdentityMap(Expression
Expression selecting the Objects to be returned selectionCriteria, Class<?> Class to be considered theClass, DataRecord Record translationRow, InMemoryQueryIndirectionPolicy valueHolderPolicy)Implements org. |
| public Vector | getAllFromIdentityMap(Expression
Expression selecting the Objects to be returned selectionCriteria, Class<?> Class to be considered theClass, DataRecord Record translationRow, int valueHolderPolicy)Implements org. |
| public Vector | getAllFromIdentityMap(Expression
Expression selecting the Objects to be returned selectionCriteria, Class<?> Class to be considered theClass, DataRecord Record translationRow, InMemoryQueryIndirectionPolicy valueHolderPolicy, boolean boolean - true if only invalid Objects should be returned shouldReturnInvalidatedObjects)Implements 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)Implements org. |
| public Map | Returns: Map of Entity PKs associated to the Entities that were retrievedList of Entity PKs to extract from the cache pkList, ClassDescriptor Descriptor type to be retrieved. descriptor)ADVANCED: Using a list of Entity PK this method will attempt to bulk load the entire list from the cache. |
| public CacheKey | getCacheKeyByIndex(CacheIndex index, CacheId indexValues, boolean shouldCheckExpiry, ClassDescriptor descriptor)
Return the cache key for the cache index or null if not found. |
| public CacheKey | getCacheKeyForObject(Object
the object to get the cache key for. object, ClassDescriptor descriptor)INTERNAL: Retrieve the cache key for the given object from the identity maps. |
| public CacheKey | Returns: CacheKeyINTERNAL: Retrieve the cache key for the given object. |
| 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)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)INTERNAL: Retrieve the cache key for the given identity information. |
| public Vector | getClassesRegistered()
INTERNAL: This method is used to get a list of those classes with IdentityMaps in the Session. |
| public Object | getFromIdentityMap(Object
Object object)Implements org. |
| public Object | getFromIdentityMap(Object primaryKey, Class<?> theClass)
Implements org. |
| public Object | getFromIdentityMap(Object primaryKey, Class<?> theClass, ClassDescriptor descriptor)
ADVANCED: Return the object from the identity with the primary and class. |
| public Object | getFromIdentityMap(Object primaryKey, Class<?> theClass, boolean shouldReturnInvalidatedObjects)
Implements org. |
| public Object | getFromIdentityMap(Object primaryKey, Object object, Class<?> theClass, boolean shouldReturnInvalidatedObjects, ClassDescriptor descriptor)
INTERNAL: Return the object from the identity with the primary and class. |
| public Object | getFromIdentityMap(DataRecord
Record rowContainingPrimaryKey, Class<?> Class theClass)Implements org. |
| public Object | getFromIdentityMap(DataRecord
Record rowContainingPrimaryKey, Class<?> Class theClass, boolean boolean shouldReturnInvalidatedObjects)Implements org. |
| public Object | getFromIdentityMap(Expression
Expression selectionCriteria, Class<?> Class theClass, DataRecord Record translationRow)Implements org. |
| public Object | getFromIdentityMap(Expression
Expression selectionCriteria, Class<?> Class theClass, DataRecord Record translationRow, InMemoryQueryIndirectionPolicy valueHolderPolicy)Implements org. |
| public Object | getFromIdentityMap(Expression
Expression selectionCriteria, Class<?> Class theClass, DataRecord Record translationRow, int valueHolderPolicy)Implements org. |
| public Object | getFromIdentityMap(Expression selectionCriteria, Class<?> theClass, DataRecord translationRow, int valueHolderPolicy, boolean conforming)
INTERNAL: Query the cache in-memory. |
| public Object | getFromIdentityMap(Expression selectionCriteria, Class<?> theClass, DataRecord translationRow, int valueHolderPolicy, boolean conforming, boolean shouldReturnInvalidatedObjects)
INTERNAL: Query the cache in-memory. |
| public Object | getFromIdentityMap(Expression selectionCriteria, Class<?> theClass, DataRecord translationRow, int valueHolderPolicy, boolean conforming, boolean shouldReturnInvalidatedObjects, ClassDescriptor descriptor)
INTERNAL: Query the cache in-memory. |
| public Object | getFromIdentityMapWithDeferredLock(Object primaryKey, Class<?> theClass, ClassDescriptor descriptor)
INTERNAL: Return the object from the identity with the primary and class. |
| public Object | getFromIdentityMapWithDeferredLock(Object primaryKey, Class<?> theClass, boolean shouldReturnInvalidatedObjects, ClassDescriptor descriptor)
INTERNAL: Return the object from the identity with the primary and class. |
| public Object | getFromLocalIdentityMap(Object primaryKey, Class<?> theClass, boolean shouldReturnInvalidatedObjects, ClassDescriptor descriptor)
INTERNAL: Return the object from the local identity map with the primary and class. |
| public Object | getFromLocalIdentityMapWithDeferredLock(Object primaryKey, Class<?> theClass, boolean shouldReturnInvalidatedObjects, ClassDescriptor descriptor)
INTERNAL: Return the object from the local identity map with the primary and class. |
| public IdentityMap | getIdentityMap(Class<?> theClass)
INTERNAL: (public to allow test cases to check) Return the identity map for the class, if missing create a new one. |
| public IdentityMap | getIdentityMap(ClassDescriptor descriptor)
INTERNAL: Get the identity map for the given class from the IdentityMapManager |
| public IdentityMap | getIdentityMap(ClassDescriptor descriptor, boolean returnNullIfMissing)
INTERNAL: Get the identity map for the given class from the IdentityMapManager |
| public IdentityMapManager | 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)
INTERNAL: Get the cached results associated with a query. |
| public long | getRemainingValidTime(Object
Object under consideration object)Implements org. |
| public AbstractSession | |
| public Object | getWrapper(Object primaryKey, Class<?> theClass)
INTERNAL: Get the wrapper object from the cache key associated with the given primary key, this is used for EJB. |
| public WriteLockManager | |
| public Object | getWriteLockValue(Object
Object object)Implements org. |
| public Object | getWriteLockValue(Object primaryKey, Class<?> theClass)
Implements org. |
| public Object | getWriteLockValue(Object primaryKey, Class<?> theClass, ClassDescriptor descriptor)
ADVANCED: Extract the write lock value from the identity map. |
| public void | initializeAllIdentityMaps()
Implements org. |
| public void | initializeIdentityMap(Class<?>
Class theClass)Implements org. |
| public void | initializeIdentityMaps()
Implements org. |
| public CacheKey | internalPutInIdentityMap(Object object, Object key, Object writeLockValue, long readTime, ClassDescriptor descriptor)
INTERNAL: Register the object with the cache. |
| public void | invalidateAll()
Implements org. |
| public void | invalidateClass(Class<?> myClass)
Implements org. |
| public void | invalidateClass(Class<?>
- the class where we start invalidation myClass, boolean - default is true where we invalidate
up the inheritance tree to the root descriptor recurseAndInvalidateToParentRoot)Implements org. |
| public void | invalidateObject(Object
Object object)Implements org. |
| public void | invalidateObject(Object object, boolean
if true the invalidation will be broadcast to each server in the cluster. invalidateCluster)Implements org. |
| public void | invalidateObject(Object primaryKey, Class<?> theClass)
Implements org. |
| public void | invalidateObject(Object primaryKey, Class<?> theClass, boolean
if true the invalidation will be broadcast to each server in the cluster. invalidateCluster)Implements org. |
| public void | invalidateObject(DataRecord rowContainingPrimaryKey, Class<?> theClass)
Implements org. |
| public void | invalidateObject(DataRecord rowContainingPrimaryKey, Class<?> theClass, boolean
if true the invalidation will be broadcast to each server in the cluster. invalidateCluster)Implements org. |
| public void | invalidateObjects(Expression
Expression selectionCriteria)Implements 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)Implements org. |
| public void | invalidateObjects(Collection<E>
objects to be invalidated collection)Implements org. |
| public void | invalidateObjects(Collection<E> collection, boolean
if true the invalidation will be broadcast to each server in the cluster. invalidateCluster)Implements org. |
| public void | invalidateQueryCache(Class<?> classThatChanged)
Implements org. |
| public boolean | isValid(Object object)
Implements org. |
| public boolean | isValid(Object primaryKey, Class<?> theClass)
Implements org. |
| public boolean | isValid(DataRecord rowContainingPrimaryKey, Class<?> theClass)
Implements org. |
| public void | printIdentityMap(Class<?> businessClass)
Implements org. |
| public void | printIdentityMapLocks()
Implements org. |
| public void | printIdentityMaps()
Implements org. |
| public void | putCacheKeyByIndex(CacheIndex index, CacheId indexValues, CacheKey cacheKey, ClassDescriptor descriptor)
Index the cache key by the index values. |
| public Object | putInIdentityMap(Object
Object object)Implements org. |
| public Object | putInIdentityMap(Object object, Object key)
Implements org. |
| public Object | putInIdentityMap(Object object, Object key, Object writeLockValue)
Implements org. |
| public Object | putInIdentityMap(Object
Object object, Object Object key, Object Object for versioning writeLockValue, long long, time in milliseconds readTime)Implements org. |
| public Object | putInIdentityMap(Object object, Object key, Object writeLockValue, long readTime, ClassDescriptor descriptor)
ADVANCED: Register the object with the cache. |
| public void | putQueryResult(ReadQuery query, List<E> parameters, Object results)
INTERNAL: Set the results for a query. |
| public void | |
| public Object | removeFromIdentityMap(Object
Object object)Implements org. |
| public Object | removeFromIdentityMap(Object key, Class<?> theClass)
Implements org. |
| public Object | removeFromIdentityMap(Object key, Class<?> theClass, ClassDescriptor descriptor, Object object)
INTERNAL: Remove the object from the object cache. |
| public void | setIdentityMapManager(IdentityMapManager identityMapManager)
INTERNAL: Set the IdentityMapManager for this IdentityMapAccessor |
| public void | setWrapper(Object primaryKey, Class<?> theClass, Object wrapper)
INTERNAL: Update the wrapper object the cache key associated with the given primary key, this is used for EJB. |
| public void | updateWriteLockValue(Object
Object object, Object Object for versioning writeLockValue)Implements org. |
| public void | updateWriteLockValue(Object primaryKey, Class<?> theClass, Object writeLockValue)
Implements org. |
| public void | validateCache()
Implements org. |