public class IdentityMapAccessor extends java.lang.Object implements IdentityMapAccessor, java.io.Serializable
| Constructor and Description |
|---|
IdentityMapAccessor()
INTERNAL:
|
IdentityMapAccessor(AbstractSession session)
INTERNAL:
An IdentityMapAccessor sits between the session and the identityMapManager
It needs references in both directions.
|
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 |
|---|---|
CacheKey |
acquireDeferredLock(java.lang.Object primarKey,
java.lang.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.
|
CacheKey |
acquireLock(java.lang.Object primaryKey,
java.lang.Class domainClass,
boolean forMerge,
ClassDescriptor descriptor,
boolean isCacheCheckComplete)
INTERNAL:
Provides access for setting a concurrency lock on an object in the IdentityMap.
|
CacheKey |
acquireLock(java.lang.Object primarKey,
java.lang.Class javaClass,
ClassDescriptor descriptor,
boolean isCacheCheckComplete)
INTERNAL:
Lock the identity map for the object, this must be done when building objects.
|
CacheKey |
acquireLockNoWait(java.lang.Object primaryKey,
java.lang.Class domainClass,
boolean forMerge,
ClassDescriptor descriptor)
INTERNAL:
Provides access for setting a concurrency lock on an object in the IdentityMap.
|
CacheKey |
acquireLockWithWait(java.lang.Object primaryKey,
java.lang.Class domainClass,
boolean forMerge,
ClassDescriptor descriptor,
int wait)
INTERNAL:
Provides access for setting a concurrency lock on an object in the IdentityMap.
|
CacheKey |
acquireReadLockOnCacheKey(java.lang.Object primaryKey,
java.lang.Class domainClass,
ClassDescriptor descriptor)
INTERNAL:
Find the cachekey for the provided primary key and place a readlock on it.
|
CacheKey |
acquireReadLockOnCacheKeyNoWait(java.lang.Object primaryKey,
java.lang.Class domainClass,
ClassDescriptor descriptor)
INTERNAL:
Find the cachekey for the provided primary key and place a readlock on it.
|
boolean |
acquireWriteLock()
INTERNAL:
Lock the entire cache if the cache isolation requires.
|
void |
clearQueryCache()
ADVANCED:
Clear all the query caches
|
void |
clearQueryCache(ReadQuery query)
ADVANCED:
Clear the query class associated with the passed-in read query
|
void |
clearQueryCache(java.lang.String sessionQueryName)
ADVANCED:
Clear the query cache associated with the named query on the session
|
void |
clearQueryCache(java.lang.String descriptorQueryName,
java.lang.Class queryClass)
ADVANCED:
Clear the query cache associated with the named query on the descriptor for the given class
|
boolean |
containsObjectInIdentityMap(java.lang.Object object)
ADVANCED:
Return if their is an object for the primary key.
|
boolean |
containsObjectInIdentityMap(java.lang.Object primaryKey,
java.lang.Class theClass)
ADVANCED:
Return if their is an object for the primary key.
|
boolean |
containsObjectInIdentityMap(java.lang.Object primaryKey,
java.lang.Class theClass,
ClassDescriptor descriptor)
INTERNAL:
Return if their is an object for the primary key.
|
boolean |
containsObjectInIdentityMap(Record rowContainingPrimaryKey,
java.lang.Class theClass)
ADVANCED:
Return if their is an object for the row containing primary key and the class.
|
boolean |
containsObjectInIdentityMap(java.util.Vector primaryKey,
java.lang.Class theClass)
Deprecated.
|
java.util.Map<java.lang.Object,CacheKey> |
getAllCacheKeysFromIdentityMapWithEntityPK(java.lang.Object[] pkList,
ClassDescriptor descriptor)
ADVANCED:
Using a list of Entity PK this method will attempt to bulk load the entire list from the cache.
|
java.util.Vector |
getAllFromIdentityMap(Expression selectionCriteria,
java.lang.Class theClass,
Record translationRow)
ADVANCED:
Query the cache in-memory.
|
java.util.Vector |
getAllFromIdentityMap(Expression selectionCriteria,
java.lang.Class theClass,
Record translationRow,
InMemoryQueryIndirectionPolicy valueHolderPolicy)
ADVANCED:
Query the cache in-memory.
|
java.util.Vector |
getAllFromIdentityMap(Expression selectionCriteria,
java.lang.Class theClass,
Record translationRow,
InMemoryQueryIndirectionPolicy valueHolderPolicy,
boolean shouldReturnInvalidatedObjects)
ADVANCED:
Query the cache in-memory.
|
java.util.Vector |
getAllFromIdentityMap(Expression selectionCriteria,
java.lang.Class theClass,
Record translationRow,
int valueHolderPolicy)
ADVANCED:
Query the cache in-memory.
|
java.util.Vector |
getAllFromIdentityMap(Expression selectionCriteria,
java.lang.Class theClass,
Record translationRow,
int valueHolderPolicy,
boolean shouldReturnInvalidatedObjects)
ADVANCED:
Query the cache in-memory.
|
java.util.Map<java.lang.Object,java.lang.Object> |
getAllFromIdentityMapWithEntityPK(java.lang.Object[] pkList,
ClassDescriptor descriptor)
ADVANCED:
Using a list of Entity PK this method will attempt to bulk load the entire list from the cache.
|
CacheKey |
getCacheKeyByIndex(CacheIndex index,
CacheId indexValues,
boolean shouldCheckExpiry,
ClassDescriptor descriptor)
Return the cache key for the cache index or null if not found.
|
CacheKey |
getCacheKeyForObject(java.lang.Object object)
INTERNAL:
Retrieve the cache key for the given object.
|
CacheKey |
getCacheKeyForObject(java.lang.Object primaryKey,
java.lang.Class myClass,
ClassDescriptor descriptor,
boolean forMerge)
INTERNAL:
Retrieve the cache key for the given identity information.
|
CacheKey |
getCacheKeyForObject(java.lang.Object object,
ClassDescriptor descriptor)
INTERNAL:
Retrieve the cache key for the given object from the identity maps.
|
CacheKey |
getCacheKeyForObjectForLock(java.lang.Object primaryKey,
java.lang.Class myClass,
ClassDescriptor descriptor)
INTERNAL:
Retrieve the cache key for the given identity information.
|
java.util.Vector |
getClassesRegistered()
INTERNAL:
This method is used to get a list of those classes with IdentityMaps in the Session.
|
java.lang.Object |
getFromIdentityMap(Expression selectionCriteria,
java.lang.Class theClass,
Record translationRow)
ADVANCED:
Query the cache in-memory.
|
java.lang.Object |
getFromIdentityMap(Expression selectionCriteria,
java.lang.Class theClass,
Record translationRow,
InMemoryQueryIndirectionPolicy valueHolderPolicy)
ADVANCED:
Query the cache in-memory.
|
java.lang.Object |
getFromIdentityMap(Expression selectionCriteria,
java.lang.Class theClass,
Record translationRow,
int valueHolderPolicy)
ADVANCED:
Query the cache in-memory.
|
java.lang.Object |
getFromIdentityMap(Expression selectionCriteria,
java.lang.Class theClass,
Record translationRow,
int valueHolderPolicy,
boolean conforming)
INTERNAL:
Query the cache in-memory.
|
java.lang.Object |
getFromIdentityMap(Expression selectionCriteria,
java.lang.Class theClass,
Record translationRow,
int valueHolderPolicy,
boolean conforming,
boolean shouldReturnInvalidatedObjects)
INTERNAL:
Query the cache in-memory.
|
java.lang.Object |
getFromIdentityMap(Expression selectionCriteria,
java.lang.Class theClass,
Record translationRow,
int valueHolderPolicy,
boolean conforming,
boolean shouldReturnInvalidatedObjects,
ClassDescriptor descriptor)
INTERNAL:
Query the cache in-memory.
|
java.lang.Object |
getFromIdentityMap(java.lang.Object object)
ADVANCED:
Return the object from the identity with primary and class of the given object.
|
java.lang.Object |
getFromIdentityMap(java.lang.Object primaryKey,
java.lang.Class theClass)
ADVANCED:
Return the object from the identity with the primary and class.
|
java.lang.Object |
getFromIdentityMap(java.lang.Object primaryKey,
java.lang.Class theClass,
boolean shouldReturnInvalidatedObjects)
ADVANCED:
Return the object from the identity with the primary and class.
|
java.lang.Object |
getFromIdentityMap(java.lang.Object primaryKey,
java.lang.Class theClass,
ClassDescriptor descriptor)
ADVANCED:
Return the object from the identity with the primary and class.
|
java.lang.Object |
getFromIdentityMap(java.lang.Object primaryKey,
java.lang.Object object,
java.lang.Class theClass,
boolean shouldReturnInvalidatedObjects,
ClassDescriptor descriptor)
INTERNAL:
Return the object from the identity with the primary and class.
|
java.lang.Object |
getFromIdentityMap(Record rowContainingPrimaryKey,
java.lang.Class theClass)
ADVANCED:
Return the object from the identity with the primary and class.
|
java.lang.Object |
getFromIdentityMap(Record rowContainingPrimaryKey,
java.lang.Class theClass,
boolean shouldReturnInvalidatedObjects)
ADVANCED:
Return the object from the identity with the primary and class.
|
java.lang.Object |
getFromIdentityMap(java.util.Vector primaryKey,
java.lang.Class theClass)
Deprecated.
|
java.lang.Object |
getFromIdentityMap(java.util.Vector primaryKey,
java.lang.Class theClass,
boolean shouldReturnInvalidatedObjects)
Deprecated.
|
java.lang.Object |
getFromIdentityMapWithDeferredLock(java.lang.Object primaryKey,
java.lang.Class theClass,
boolean shouldReturnInvalidatedObjects,
ClassDescriptor descriptor)
INTERNAL:
Return the object from the identity with the primary and class.
|
java.lang.Object |
getFromIdentityMapWithDeferredLock(java.lang.Object primaryKey,
java.lang.Class theClass,
ClassDescriptor descriptor)
INTERNAL:
Return the object from the identity with the primary and class.
|
java.lang.Object |
getFromLocalIdentityMap(java.lang.Object primaryKey,
java.lang.Class theClass,
boolean shouldReturnInvalidatedObjects,
ClassDescriptor descriptor)
INTERNAL:
Return the object from the local identity map with the primary and class.
|
java.lang.Object |
getFromLocalIdentityMapWithDeferredLock(java.lang.Object primaryKey,
java.lang.Class theClass,
boolean shouldReturnInvalidatedObjects,
ClassDescriptor descriptor)
INTERNAL:
Return the object from the local identity map with the primary and class.
|
IdentityMap |
getIdentityMap(java.lang.Class theClass)
INTERNAL: (public to allow test cases to check)
Return the identity map for the class, if missing create a new one.
|
IdentityMap |
getIdentityMap(ClassDescriptor descriptor)
INTERNAL:
Get the identity map for the given class from the IdentityMapManager
|
IdentityMap |
getIdentityMap(ClassDescriptor descriptor,
boolean returnNullIfMissing)
INTERNAL:
Get the identity map for the given class from the IdentityMapManager
|
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.
|
java.lang.Object |
getQueryResult(ReadQuery query,
java.util.List parameters,
boolean checkExpiry)
INTERNAL:
Get the cached results associated with a query.
|
long |
getRemainingValidTime(java.lang.Object object)
ADVANCED:
Return the remaining life of this object.
|
AbstractSession |
getSession()
INTERNAL:
get the session associated with this IdentityMapAccessor
|
java.lang.Object |
getWrapper(java.lang.Object primaryKey,
java.lang.Class theClass)
INTERNAL:
Get the wrapper object from the cache key associated with the given primary key,
this is used for EJB.
|
WriteLockManager |
getWriteLockManager()
INTERNAL:
Returns the single write Lock manager for this session
|
java.lang.Object |
getWriteLockValue(java.lang.Object object)
ADVANCED:
Extract the write lock value from the identity map.
|
java.lang.Object |
getWriteLockValue(java.lang.Object primaryKey,
java.lang.Class theClass)
ADVANCED:
Extract the write lock value from the identity map.
|
java.lang.Object |
getWriteLockValue(java.lang.Object primaryKey,
java.lang.Class theClass,
ClassDescriptor descriptor)
ADVANCED:
Extract the write lock value from the identity map.
|
java.lang.Object |
getWriteLockValue(java.util.Vector primaryKey,
java.lang.Class theClass)
Deprecated.
|
void |
initializeAllIdentityMaps()
PUBLIC:
Reset the entire object cache.
|
void |
initializeIdentityMap(java.lang.Class theClass)
PUBLIC:
Reset the identity map for only the instances of the class.
|
void |
initializeIdentityMaps()
PUBLIC:
Reset the entire local object cache.
|
CacheKey |
internalPutInIdentityMap(java.lang.Object object,
java.lang.Object key,
java.lang.Object writeLockValue,
long readTime,
ClassDescriptor descriptor)
INTERNAL:
Register the object with the cache.
|
void |
invalidateAll()
ADVANCED:
Set all of the objects from all identity maps to be invalid in the cache.
|
void |
invalidateClass(java.lang.Class myClass)
ADVANCED:
Set all of the objects of a specific class to be invalid in the cache.
|
void |
invalidateClass(java.lang.Class myClass,
boolean recurseAndInvalidateToParentRoot)
ADVANCED:
Set all of the objects of a specific class to be invalid in the cache.
|
void |
invalidateObject(java.lang.Object object)
ADVANCED:
Set an object to be invalid in the cache.
|
void |
invalidateObject(java.lang.Object object,
boolean invalidateCluster)
ADVANCED:
Set an object to be invalid in the cache.
|
void |
invalidateObject(java.lang.Object primaryKey,
java.lang.Class theClass)
ADVANCED:
Set an object to be invalid in the cache.
|
void |
invalidateObject(java.lang.Object primaryKey,
java.lang.Class theClass,
boolean invalidateCluster)
ADVANCED:
Set an object to be invalid in the cache.
|
void |
invalidateObject(Record rowContainingPrimaryKey,
java.lang.Class theClass)
ADVANCED:
Set an object to be invalid in the cache.
|
void |
invalidateObject(Record rowContainingPrimaryKey,
java.lang.Class theClass,
boolean invalidateCluster)
ADVANCED:
Set an object to be invalid in the cache.
|
void |
invalidateObject(java.util.Vector primaryKey,
java.lang.Class theClass)
Deprecated.
|
void |
invalidateObject(java.util.Vector primaryKey,
java.lang.Class theClass,
boolean invalidateCluster)
Deprecated.
|
void |
invalidateObjects(java.util.Collection collection)
ADVANCED:
Set all of the objects in the given collection to be invalid in the cache.
|
void |
invalidateObjects(java.util.Collection collection,
boolean invalidateCluster)
ADVANCED:
Set all of the objects in the given collection to be invalid in the cache.
|
void |
invalidateObjects(Expression selectionCriteria)
ADVANCED:
Set all of the objects from the given Expression to be invalid in the cache.
|
void |
invalidateObjects(Expression selectionCriteria,
java.lang.Class theClass,
Record translationRow,
boolean shouldInvalidateOnException)
ADVANCED:
Queries the cache in-memory with the passed in criteria and invalidates matching Objects.
|
void |
invalidateQueryCache(java.lang.Class classThatChanged)
Invalidate/remove any results for the class from the query cache.
|
boolean |
isValid(java.lang.Object object)
ADVANCED:
Return if this object is valid in the cache.
|
boolean |
isValid(java.lang.Object primaryKey,
java.lang.Class theClass)
ADVANCED:
Return if this object is valid in the cache.
|
boolean |
isValid(Record rowContainingPrimaryKey,
java.lang.Class theClass)
ADVANCED:
Return if this object is valid in the cache.
|
boolean |
isValid(java.util.Vector primaryKey,
java.lang.Class theClass)
Deprecated.
|
java.lang.Object |
primaryKeyFromVector(java.util.Vector primaryKeyVector)
Convert the primary key Vector into a primary key object.
|
void |
printIdentityMap(java.lang.Class businessClass)
PUBLIC:
Used to print all the objects in the identity map of the passed in class.
|
void |
printIdentityMapLocks()
PUBLIC:
Used to print all the locks in every identity map in this session.
|
void |
printIdentityMaps()
PUBLIC:
Used to print all the objects in every identity map in this session.
|
void |
putCacheKeyByIndex(CacheIndex index,
CacheId indexValues,
CacheKey cacheKey,
ClassDescriptor descriptor)
Index the cache key by the index values.
|
java.lang.Object |
putInIdentityMap(java.lang.Object object)
ADVANCED:
Register the object with the cache.
|
java.lang.Object |
putInIdentityMap(java.lang.Object object,
java.lang.Object key)
ADVANCED:
Register the object with the cache.
|
java.lang.Object |
putInIdentityMap(java.lang.Object object,
java.lang.Object key,
java.lang.Object writeLockValue)
ADVANCED:
Register the object with the cache.
|
java.lang.Object |
putInIdentityMap(java.lang.Object object,
java.lang.Object key,
java.lang.Object writeLockValue,
long readTime)
ADVANCED:
Register the object with the cache.
|
java.lang.Object |
putInIdentityMap(java.lang.Object object,
java.lang.Object key,
java.lang.Object writeLockValue,
long readTime,
ClassDescriptor descriptor)
ADVANCED:
Register the object with the cache.
|
java.lang.Object |
putInIdentityMap(java.lang.Object object,
java.util.Vector key)
Deprecated.
|
java.lang.Object |
putInIdentityMap(java.lang.Object object,
java.util.Vector key,
java.lang.Object writeLockValue)
Deprecated.
|
java.lang.Object |
putInIdentityMap(java.lang.Object object,
java.util.Vector key,
java.lang.Object writeLockValue,
long readTime)
Deprecated.
|
void |
putQueryResult(ReadQuery query,
java.util.List parameters,
java.lang.Object results)
INTERNAL:
Set the results for a query.
|
void |
releaseWriteLock()
INTERNAL:
Lock the entire cache if the cache isolation requires.
|
java.lang.Object |
removeFromIdentityMap(java.lang.Object object)
ADVANCED:
Remove the object from the object cache.
|
java.lang.Object |
removeFromIdentityMap(java.lang.Object key,
java.lang.Class theClass)
ADVANCED:
Remove the object from the object cache.
|
java.lang.Object |
removeFromIdentityMap(java.lang.Object key,
java.lang.Class theClass,
ClassDescriptor descriptor,
java.lang.Object object)
INTERNAL:
Remove the object from the object cache.
|
java.lang.Object |
removeFromIdentityMap(java.util.Vector key,
java.lang.Class theClass)
Deprecated.
|
void |
setIdentityMapManager(IdentityMapManager identityMapManager)
INTERNAL:
Set the IdentityMapManager for this IdentityMapAccessor
|
void |
setWrapper(java.lang.Object primaryKey,
java.lang.Class theClass,
java.lang.Object wrapper)
INTERNAL:
Update the wrapper object the cache key associated with the given primary key,
this is used for EJB.
|
void |
updateWriteLockValue(java.lang.Object primaryKey,
java.lang.Class theClass,
java.lang.Object writeLockValue)
ADVANCED:
Update the write lock value in the cache.
|
void |
updateWriteLockValue(java.lang.Object object,
java.lang.Object writeLockValue)
ADVANCED:
Update the write lock value in the cache.
|
void |
updateWriteLockValue(java.util.Vector primaryKey,
java.lang.Class theClass,
java.lang.Object writeLockValue)
Deprecated.
|
void |
validateCache()
INTERNAL:
This can be used to help debugging an object identity problem.
|
public IdentityMapAccessor()
public IdentityMapAccessor(AbstractSession session)
public IdentityMapAccessor(AbstractSession session, IdentityMapManager identityMapManager)
public CacheKey acquireDeferredLock(java.lang.Object primarKey, java.lang.Class javaClass, ClassDescriptor descriptor, boolean isCacheCheckComplete)
public CacheKey acquireLock(java.lang.Object primarKey, java.lang.Class javaClass, ClassDescriptor descriptor, boolean isCacheCheckComplete)
public CacheKey acquireLock(java.lang.Object primaryKey, java.lang.Class domainClass, boolean forMerge, ClassDescriptor descriptor, boolean isCacheCheckComplete)
public CacheKey acquireLockNoWait(java.lang.Object primaryKey, java.lang.Class domainClass, boolean forMerge, ClassDescriptor descriptor)
public CacheKey acquireLockWithWait(java.lang.Object primaryKey, java.lang.Class domainClass, boolean forMerge, ClassDescriptor descriptor, int wait)
public CacheKey acquireReadLockOnCacheKey(java.lang.Object primaryKey, java.lang.Class domainClass, ClassDescriptor descriptor)
public CacheKey acquireReadLockOnCacheKeyNoWait(java.lang.Object primaryKey, java.lang.Class domainClass, ClassDescriptor descriptor)
public boolean acquireWriteLock()
public void clearQueryCache()
clearQueryCache in interface IdentityMapAccessorpublic void clearQueryCache(ReadQuery query)
clearQueryCache in interface IdentityMapAccessorpublic void clearQueryCache(java.lang.String sessionQueryName)
clearQueryCache in interface IdentityMapAccessorpublic void clearQueryCache(java.lang.String descriptorQueryName,
java.lang.Class queryClass)
clearQueryCache in interface IdentityMapAccessorpublic boolean containsObjectInIdentityMap(java.lang.Object object)
containsObjectInIdentityMap in interface IdentityMapAccessorpublic java.lang.Object primaryKeyFromVector(java.util.Vector primaryKeyVector)
@Deprecated
public boolean containsObjectInIdentityMap(java.util.Vector primaryKey,
java.lang.Class theClass)
containsObjectInIdentityMap in interface IdentityMapAccessorIdentityMapAccessor.containsObjectInIdentityMap(Object, Class)public boolean containsObjectInIdentityMap(java.lang.Object primaryKey,
java.lang.Class theClass)
containsObjectInIdentityMap in interface IdentityMapAccessorpublic boolean containsObjectInIdentityMap(java.lang.Object primaryKey,
java.lang.Class theClass,
ClassDescriptor descriptor)
public boolean containsObjectInIdentityMap(Record rowContainingPrimaryKey, java.lang.Class theClass)
containsObjectInIdentityMap in interface IdentityMapAccessorpublic CacheKey getCacheKeyForObject(java.lang.Object object, ClassDescriptor descriptor)
object - the object to get the cache key for.public java.util.Vector getClassesRegistered()
public java.util.Vector getAllFromIdentityMap(Expression selectionCriteria, java.lang.Class theClass, Record translationRow) throws QueryException
QueryExceptionpublic java.util.Vector getAllFromIdentityMap(Expression selectionCriteria, java.lang.Class theClass, Record translationRow, InMemoryQueryIndirectionPolicy valueHolderPolicy) throws QueryException
getAllFromIdentityMap in interface IdentityMapAccessorselectionCriteria - Expression selecting the Objects to be returnedtheClass - Class to be consideredtranslationRow - RecordvalueHolderPolicy - see
InMemoryQueryIndirectionPolicyQueryExceptionpublic java.util.Vector getAllFromIdentityMap(Expression selectionCriteria, java.lang.Class theClass, Record translationRow, int valueHolderPolicy) throws QueryException
getAllFromIdentityMap in interface IdentityMapAccessorselectionCriteria - Expression selecting the Objects to be returnedtheClass - Class to be consideredtranslationRow - RecordvalueHolderPolicy - see
InMemoryQueryIndirectionPolicyQueryExceptionpublic java.util.Vector getAllFromIdentityMap(Expression selectionCriteria, java.lang.Class theClass, Record translationRow, InMemoryQueryIndirectionPolicy valueHolderPolicy, boolean shouldReturnInvalidatedObjects) throws QueryException
getAllFromIdentityMap in interface IdentityMapAccessorselectionCriteria - Expression selecting the Objects to be returnedtheClass - Class to be consideredtranslationRow - RecordvalueHolderPolicy - see
InMemoryQueryIndirectionPolicyshouldReturnInvalidatedObjects - boolean - true if only invalid Objects should be returnedQueryExceptionpublic java.util.Vector getAllFromIdentityMap(Expression selectionCriteria, java.lang.Class theClass, Record translationRow, int valueHolderPolicy, boolean shouldReturnInvalidatedObjects) throws QueryException
getAllFromIdentityMap in interface IdentityMapAccessorselectionCriteria - Expression selecting the Objects to be returnedtheClass - Class to be consideredtranslationRow - RecordvalueHolderPolicy - see
InMemoryQueryIndirectionPolicyshouldReturnInvalidatedObjects - boolean - true if only invalid Objects should be returnedQueryExceptionpublic java.util.Map<java.lang.Object,java.lang.Object> getAllFromIdentityMapWithEntityPK(java.lang.Object[] pkList,
ClassDescriptor descriptor)
pkList - List of Entity PKs to extract from the cacheClassDescriptor - Descriptor type to be retrieved.QueryExceptionpublic java.util.Map<java.lang.Object,CacheKey> getAllCacheKeysFromIdentityMapWithEntityPK(java.lang.Object[] pkList, ClassDescriptor descriptor)
pkList - List of Entity PKs to extract from the cacheClassDescriptor - Descriptor type to be retrieved.QueryExceptionpublic java.lang.Object getFromIdentityMap(java.lang.Object object)
getFromIdentityMap in interface IdentityMapAccessorobject - Objectpublic CacheKey getCacheKeyForObject(java.lang.Object object)
public CacheKey getCacheKeyForObjectForLock(java.lang.Object primaryKey, java.lang.Class myClass, ClassDescriptor descriptor)
primaryKey - the primary key of the cache key to be retrieved.myClass - the class of the cache key to be retrieved.public CacheKey getCacheKeyForObject(java.lang.Object primaryKey, java.lang.Class myClass, ClassDescriptor descriptor, boolean forMerge)
primaryKey - the primary key of the cache key to be retrieved.myClass - the class of the cache key to be retrieved.@Deprecated
public java.lang.Object getFromIdentityMap(java.util.Vector primaryKey,
java.lang.Class theClass)
getFromIdentityMap in interface IdentityMapAccessorIdentityMapAccessor.getFromIdentityMap(Object, Class)public java.lang.Object getFromIdentityMap(java.lang.Object primaryKey,
java.lang.Class theClass)
getFromIdentityMap in interface IdentityMapAccessorpublic java.lang.Object getFromIdentityMap(java.lang.Object primaryKey,
java.lang.Class theClass,
ClassDescriptor descriptor)
@Deprecated
public java.lang.Object getFromIdentityMap(java.util.Vector primaryKey,
java.lang.Class theClass,
boolean shouldReturnInvalidatedObjects)
getFromIdentityMap in interface IdentityMapAccessorIdentityMapAccessor.getFromIdentityMap(Object, Class, boolean)public java.lang.Object getFromIdentityMap(java.lang.Object primaryKey,
java.lang.Class theClass,
boolean shouldReturnInvalidatedObjects)
getFromIdentityMap in interface IdentityMapAccessorpublic java.lang.Object getFromIdentityMap(java.lang.Object primaryKey,
java.lang.Object object,
java.lang.Class theClass,
boolean shouldReturnInvalidatedObjects,
ClassDescriptor descriptor)
public java.lang.Object getFromLocalIdentityMap(java.lang.Object primaryKey,
java.lang.Class theClass,
boolean shouldReturnInvalidatedObjects,
ClassDescriptor descriptor)
public java.lang.Object getFromLocalIdentityMapWithDeferredLock(java.lang.Object primaryKey,
java.lang.Class theClass,
boolean shouldReturnInvalidatedObjects,
ClassDescriptor descriptor)
public java.lang.Object getFromIdentityMap(Record rowContainingPrimaryKey, java.lang.Class theClass)
getFromIdentityMap in interface IdentityMapAccessorrowContainingPrimaryKey - RecordtheClass - Classpublic java.lang.Object getFromIdentityMap(Record rowContainingPrimaryKey, java.lang.Class theClass, boolean shouldReturnInvalidatedObjects)
getFromIdentityMap in interface IdentityMapAccessorrowContainingPrimaryKey - RecordtheClass - ClassshouldReturnInvalidatedObjects - booleanpublic java.lang.Object getFromIdentityMap(Expression selectionCriteria, java.lang.Class theClass, Record translationRow) throws QueryException
getFromIdentityMap in interface IdentityMapAccessorselectionCriteria - ExpressiontheClass - ClasstranslationRow - RecordQueryExceptionpublic java.lang.Object getFromIdentityMap(Expression selectionCriteria, java.lang.Class theClass, Record translationRow, InMemoryQueryIndirectionPolicy valueHolderPolicy) throws QueryException
getFromIdentityMap in interface IdentityMapAccessorselectionCriteria - ExpressiontheClass - ClasstranslationRow - RecordvalueHolderPolicy - see InMemoryQueryIndirectionPolicyQueryExceptionpublic java.lang.Object getFromIdentityMap(Expression selectionCriteria, java.lang.Class theClass, Record translationRow, int valueHolderPolicy) throws QueryException
getFromIdentityMap in interface IdentityMapAccessorselectionCriteria - ExpressiontheClass - ClasstranslationRow - RecordvalueHolderPolicy - see InMemoryQueryIndirectionPolicyQueryExceptionpublic java.lang.Object getFromIdentityMap(Expression selectionCriteria, java.lang.Class theClass, Record translationRow, int valueHolderPolicy, boolean conforming)
public java.lang.Object getFromIdentityMap(Expression selectionCriteria, java.lang.Class theClass, Record translationRow, int valueHolderPolicy, boolean conforming, boolean shouldReturnInvalidatedObjects)
public java.lang.Object getFromIdentityMap(Expression selectionCriteria, java.lang.Class theClass, Record translationRow, int valueHolderPolicy, boolean conforming, boolean shouldReturnInvalidatedObjects, ClassDescriptor descriptor)
public java.lang.Object getFromIdentityMapWithDeferredLock(java.lang.Object primaryKey,
java.lang.Class theClass,
ClassDescriptor descriptor)
public java.lang.Object getFromIdentityMapWithDeferredLock(java.lang.Object primaryKey,
java.lang.Class theClass,
boolean shouldReturnInvalidatedObjects,
ClassDescriptor descriptor)
public IdentityMapManager getIdentityMapManager()
public IdentityMap getIdentityMap(java.lang.Class theClass)
public IdentityMap getIdentityMap(ClassDescriptor descriptor)
public IdentityMap getIdentityMap(ClassDescriptor descriptor, boolean returnNullIfMissing)
public java.lang.Object getQueryResult(ReadQuery query, java.util.List parameters, boolean checkExpiry)
public long getRemainingValidTime(java.lang.Object object)
getRemainingValidTime in interface IdentityMapAccessorobject - Object under considerationpublic AbstractSession getSession()
public java.lang.Object getWrapper(java.lang.Object primaryKey,
java.lang.Class theClass)
public WriteLockManager getWriteLockManager()
public java.lang.Object getWriteLockValue(java.lang.Object object)
getWriteLockValue in interface IdentityMapAccessorobject - Object@Deprecated
public java.lang.Object getWriteLockValue(java.util.Vector primaryKey,
java.lang.Class theClass)
getWriteLockValue in interface IdentityMapAccessorIdentityMapAccessor.getWriteLockValue(Object, Class)public java.lang.Object getWriteLockValue(java.lang.Object primaryKey,
java.lang.Class theClass)
getWriteLockValue in interface IdentityMapAccessorpublic java.lang.Object getWriteLockValue(java.lang.Object primaryKey,
java.lang.Class theClass,
ClassDescriptor descriptor)
public void initializeAllIdentityMaps()
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. 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.
initializeAllIdentityMaps in interface IdentityMapAccessorpublic void initializeIdentityMap(java.lang.Class theClass)
initializeIdentityMap in interface IdentityMapAccessortheClass - Classpublic void initializeIdentityMaps()
initializeIdentityMaps in interface IdentityMapAccessorpublic void invalidateObject(java.lang.Object object)
invalidateObject in interface IdentityMapAccessorobject - Objectpublic void invalidateObject(java.lang.Object object,
boolean invalidateCluster)
invalidateObject in interface IdentityMapAccessorinvalidateCluster - if true the invalidation will be broadcast to each server in the cluster.@Deprecated
public void invalidateObject(java.util.Vector primaryKey,
java.lang.Class theClass,
boolean invalidateCluster)
invalidateObject in interface IdentityMapAccessorinvalidateCluster - if true the invalidation will be broadcast to each server in the cluster.IdentityMapAccessor.invalidateObject(Object, Class, boolean)@Deprecated
public void invalidateObject(java.util.Vector primaryKey,
java.lang.Class theClass)
invalidateObject in interface IdentityMapAccessorIdentityMapAccessor.invalidateObject(Object, Class)public void invalidateObject(java.lang.Object primaryKey,
java.lang.Class theClass)
invalidateObject in interface IdentityMapAccessorpublic void invalidateObject(java.lang.Object primaryKey,
java.lang.Class theClass,
boolean invalidateCluster)
invalidateObject in interface IdentityMapAccessorinvalidateCluster - if true the invalidation will be broadcast to each server in the cluster.public void invalidateObject(Record rowContainingPrimaryKey, java.lang.Class theClass)
invalidateObject in interface IdentityMapAccessorpublic void invalidateObject(Record rowContainingPrimaryKey, java.lang.Class theClass, boolean invalidateCluster)
invalidateObject in interface IdentityMapAccessorinvalidateCluster - if true the invalidation will be broadcast to each server in the cluster.public void invalidateObjects(Expression selectionCriteria)
invalidateObjects in interface IdentityMapAccessorselectionCriteria - Expressionpublic void invalidateObjects(Expression selectionCriteria, java.lang.Class theClass, Record translationRow, boolean shouldInvalidateOnException)
invalidateObjects in interface IdentityMapAccessorselectionCriteria - Expression selecting the Objects to be returnedtheClass - Class to be consideredtranslationRow - RecordshouldInvalidateOnException - boolean indicates weather to invalidate the object if conform threw exception.public void invalidateObjects(java.util.Collection collection)
invalidateObjects in interface IdentityMapAccessorcollection - objects to be invalidatedpublic void invalidateObjects(java.util.Collection collection,
boolean invalidateCluster)
invalidateObjects in interface IdentityMapAccessorinvalidateCluster - if true the invalidation will be broadcast to each server in the cluster.public void invalidateClass(java.lang.Class myClass)
invalidateClass in interface IdentityMapAccessorpublic void invalidateClass(java.lang.Class myClass,
boolean recurseAndInvalidateToParentRoot)
invalidateClass in interface IdentityMapAccessormyClass - - the class where we start invalidationrecurseAndInvalidateToParentRoot - - default is true where we invalidate
up the inheritance tree to the root descriptorpublic void invalidateQueryCache(java.lang.Class classThatChanged)
invalidateQueryCache in interface IdentityMapAccessorpublic void invalidateAll()
invalidateAll in interface IdentityMapAccessorpublic boolean isValid(java.lang.Object object)
isValid in interface IdentityMapAccessor@Deprecated
public boolean isValid(java.util.Vector primaryKey,
java.lang.Class theClass)
isValid in interface IdentityMapAccessorIdentityMapAccessor.isValid(Object, Class)public boolean isValid(java.lang.Object primaryKey,
java.lang.Class theClass)
isValid in interface IdentityMapAccessorpublic boolean isValid(Record rowContainingPrimaryKey, java.lang.Class theClass)
isValid in interface IdentityMapAccessorpublic void printIdentityMap(java.lang.Class businessClass)
printIdentityMap in interface IdentityMapAccessorpublic void printIdentityMaps()
printIdentityMaps in interface IdentityMapAccessorpublic void printIdentityMapLocks()
printIdentityMapLocks in interface IdentityMapAccessorpublic java.lang.Object putInIdentityMap(java.lang.Object object)
putInIdentityMap in interface IdentityMapAccessorobject - Object@Deprecated
public java.lang.Object putInIdentityMap(java.lang.Object object,
java.util.Vector key)
putInIdentityMap in interface IdentityMapAccessorIdentityMapAccessor.putInIdentityMap(Object, Object)public java.lang.Object putInIdentityMap(java.lang.Object object,
java.lang.Object key)
putInIdentityMap in interface IdentityMapAccessor@Deprecated
public java.lang.Object putInIdentityMap(java.lang.Object object,
java.util.Vector key,
java.lang.Object writeLockValue)
putInIdentityMap in interface IdentityMapAccessorIdentityMapAccessor.putInIdentityMap(Object, Object, Object)public java.lang.Object putInIdentityMap(java.lang.Object object,
java.lang.Object key,
java.lang.Object writeLockValue)
putInIdentityMap in interface IdentityMapAccessor@Deprecated
public java.lang.Object putInIdentityMap(java.lang.Object object,
java.util.Vector key,
java.lang.Object writeLockValue,
long readTime)
putInIdentityMap in interface IdentityMapAccessorobject - Objectkey - ObjectwriteLockValue - Object for versioningreadTime - long, time in millisecondsIdentityMapAccessor.putInIdentityMap(Object, Object, Object, long)public java.lang.Object putInIdentityMap(java.lang.Object object,
java.lang.Object key,
java.lang.Object writeLockValue,
long readTime)
putInIdentityMap in interface IdentityMapAccessorobject - Objectkey - ObjectwriteLockValue - Object for versioningreadTime - long, time in millisecondspublic java.lang.Object putInIdentityMap(java.lang.Object object,
java.lang.Object key,
java.lang.Object writeLockValue,
long readTime,
ClassDescriptor descriptor)
public void putQueryResult(ReadQuery query, java.util.List parameters, java.lang.Object results)
public void putCacheKeyByIndex(CacheIndex index, CacheId indexValues, CacheKey cacheKey, ClassDescriptor descriptor)
public CacheKey getCacheKeyByIndex(CacheIndex index, CacheId indexValues, boolean shouldCheckExpiry, ClassDescriptor descriptor)
public CacheKey internalPutInIdentityMap(java.lang.Object object, java.lang.Object key, java.lang.Object writeLockValue, long readTime, ClassDescriptor descriptor)
public void releaseWriteLock()
public java.lang.Object removeFromIdentityMap(java.lang.Object object)
removeFromIdentityMap in interface IdentityMapAccessorobject - Object@Deprecated
public java.lang.Object removeFromIdentityMap(java.util.Vector key,
java.lang.Class theClass)
removeFromIdentityMap in interface IdentityMapAccessorIdentityMapAccessor.removeFromIdentityMap(Object, Class)public java.lang.Object removeFromIdentityMap(java.lang.Object key,
java.lang.Class theClass)
removeFromIdentityMap in interface IdentityMapAccessorpublic java.lang.Object removeFromIdentityMap(java.lang.Object key,
java.lang.Class theClass,
ClassDescriptor descriptor,
java.lang.Object object)
public void setIdentityMapManager(IdentityMapManager identityMapManager)
public void setWrapper(java.lang.Object primaryKey,
java.lang.Class theClass,
java.lang.Object wrapper)
public void updateWriteLockValue(java.lang.Object object,
java.lang.Object writeLockValue)
updateWriteLockValue in interface IdentityMapAccessorobject - ObjectwriteLockValue - Object for versioning@Deprecated
public void updateWriteLockValue(java.util.Vector primaryKey,
java.lang.Class theClass,
java.lang.Object writeLockValue)
updateWriteLockValue in interface IdentityMapAccessorIdentityMapAccessor.updateWriteLockValue(Object, Class, Object)public void updateWriteLockValue(java.lang.Object primaryKey,
java.lang.Class theClass,
java.lang.Object writeLockValue)
updateWriteLockValue in interface IdentityMapAccessorpublic void validateCache()
validateCache in interface IdentityMapAccessorEclipseLink 2.6.3, "build v20160428-59c81c5" API Reference