|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.persistence.internal.identitymaps.CacheKey
org.eclipse.persistence.sessions.interceptors.CacheKeyInterceptor
public class CacheKeyInterceptor
The CacheKeyInterceptor allows a Cache Interceptor implementation to wrap the EclipseLink CacheKey. The CacheKey is an object that wraps the object and maintains cached based information about the object like primary key, write lock value and locking. The EclipseLink runtime will access the CacheKey and directly when releasing locks.
Field Summary |
---|
Fields inherited from class org.eclipse.persistence.internal.identitymaps.CacheKey |
---|
CACHE_KEY_INVALID, CHECK_INVALIDATION_POLICY, MAX_WAIT_TRIES |
Constructor Summary | |
---|---|
CacheKeyInterceptor(org.eclipse.persistence.internal.identitymaps.CacheKey cacheKey)
|
Method Summary | |
---|---|
void |
acquire()
Acquire the lock on the cache key object. |
void |
acquire(boolean forMerge)
Acquire the lock on the cache key object. |
void |
acquireDeferredLock()
Acquire the deferred lock. |
boolean |
acquireIfUnownedNoWait()
Acquire the lock on the cache key object. |
boolean |
acquireNoWait()
Acquire the lock on the cache key object. |
boolean |
acquireNoWait(boolean forMerge)
Acquire the lock on the cache key object. |
void |
acquireReadLock()
Acquire the read lock on the cache key object. |
boolean |
acquireReadLockNoWait()
Acquire the read lock on the cache key object. |
void |
checkDeferredLock()
Check the deferred lock on the cache key object. |
void |
checkReadLock()
Check the read lock on the cache key object. |
java.lang.Object |
clone()
INTERNAL: Clones itself. |
boolean |
equals(org.eclipse.persistence.internal.identitymaps.CacheKey key)
Determine if the receiver is equal to key. |
int |
getInvalidationState()
INTERNAL: Return the value of the invalidationState Variable The return value will be a constant CHECK_INVALIDATION_POLICY - The Invalidation policy is must be checked for this cache key's sate CACHE_KEY_INVALID - This cache key has been labeled invalid. |
java.util.Vector |
getKey()
|
long |
getLastUpdatedQueryId()
INTERNAL: This method returns the system time in millis seconds at which this object was last refreshed CR #4365 CR #2698903 ... |
org.eclipse.persistence.internal.helper.ConcurrencyManager |
getMutex()
Return the concurrency manager. |
java.lang.Object |
getObject()
|
org.eclipse.persistence.internal.identitymaps.IdentityMap |
getOwningMap()
|
long |
getReadTime()
INTERNAL: Return the current value of the Read Time variable |
Record |
getRecord()
|
org.eclipse.persistence.internal.identitymaps.CacheKey |
getWrappedCacheKey()
If a Wrapper subclasses this CacheKey this method will be used to unwrap the cache key. |
java.lang.Object |
getWrapper()
|
java.lang.Object |
getWriteLockValue()
|
int |
hashCode()
Overrides hashCode() in Object to use the primaryKey's hashCode for storage in data structures. |
boolean |
isAcquired()
Return if the lock is acquired |
void |
release()
Release the lock on the cache key object. |
void |
releaseDeferredLock()
Release the deferred lock |
void |
releaseReadLock()
Release the read lock on the cache key object. |
java.lang.Object |
removeFromOwningMap()
Removes this cacheKey from the owning map |
void |
setInvalidationState(int invalidationState)
INTERNAL: Set the value of the invalidationState Variable The possible values are from an enumeration of constants CHECK_INVALIDATION_POLICY - The invalidation policy is must be checked for this cache key's sate CACHE_KEY_INVALID - This cache key has been labeled invalid. |
void |
setKey(java.util.Vector key)
|
void |
setLastUpdatedQueryId(long id)
INTERNAL: This method sets the system time in millis seconds at which this object was last refreshed CR #4365 CR #2698903 ... |
void |
setMutex(org.eclipse.persistence.internal.helper.ConcurrencyManager mutex)
Set the concurrency manager. |
void |
setObject(java.lang.Object object)
|
void |
setOwningMap(org.eclipse.persistence.internal.identitymaps.AbstractIdentityMap map)
|
void |
setReadTime(long readTime)
INTERNAL: Set the read time of this cache key |
void |
setRecord(Record newRecord)
|
void |
setWrapper(java.lang.Object wrapper)
|
void |
setWriteLockValue(java.lang.Object writeLockValue)
|
java.lang.String |
toString()
|
void |
updateAccess()
Notifies that cache key that it has been accessed. |
Methods inherited from class org.eclipse.persistence.internal.identitymaps.CacheKey |
---|
acquireWithWait, equals, isWrapper, setIsWrapper, setOwningMap, transitionToDeferredLock, waitForObject |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public CacheKeyInterceptor(org.eclipse.persistence.internal.identitymaps.CacheKey cacheKey)
Method Detail |
---|
public void acquire()
acquire
in class org.eclipse.persistence.internal.identitymaps.CacheKey
public void acquire(boolean forMerge)
acquire
in class org.eclipse.persistence.internal.identitymaps.CacheKey
public boolean acquireNoWait()
acquireNoWait
in class org.eclipse.persistence.internal.identitymaps.CacheKey
public boolean acquireIfUnownedNoWait()
acquireIfUnownedNoWait
in class org.eclipse.persistence.internal.identitymaps.CacheKey
public boolean acquireNoWait(boolean forMerge)
acquireNoWait
in class org.eclipse.persistence.internal.identitymaps.CacheKey
public void acquireDeferredLock()
acquireDeferredLock
in class org.eclipse.persistence.internal.identitymaps.CacheKey
public void checkReadLock()
org.eclipse.persistence.internal.identitymaps.CacheKey
checkReadLock
in class org.eclipse.persistence.internal.identitymaps.CacheKey
public void checkDeferredLock()
org.eclipse.persistence.internal.identitymaps.CacheKey
checkDeferredLock
in class org.eclipse.persistence.internal.identitymaps.CacheKey
public void acquireReadLock()
acquireReadLock
in class org.eclipse.persistence.internal.identitymaps.CacheKey
public boolean acquireReadLockNoWait()
acquireReadLockNoWait
in class org.eclipse.persistence.internal.identitymaps.CacheKey
public java.lang.Object clone()
org.eclipse.persistence.internal.identitymaps.CacheKey
clone
in class org.eclipse.persistence.internal.identitymaps.CacheKey
public boolean equals(org.eclipse.persistence.internal.identitymaps.CacheKey key)
org.eclipse.persistence.internal.identitymaps.CacheKey
equals
in class org.eclipse.persistence.internal.identitymaps.CacheKey
public long getLastUpdatedQueryId()
org.eclipse.persistence.internal.identitymaps.CacheKey
getLastUpdatedQueryId
in class org.eclipse.persistence.internal.identitymaps.CacheKey
public java.util.Vector getKey()
getKey
in class org.eclipse.persistence.internal.identitymaps.CacheKey
public org.eclipse.persistence.internal.helper.ConcurrencyManager getMutex()
org.eclipse.persistence.internal.identitymaps.CacheKey
getMutex
in class org.eclipse.persistence.internal.identitymaps.CacheKey
public java.lang.Object getObject()
getObject
in class org.eclipse.persistence.internal.identitymaps.CacheKey
public org.eclipse.persistence.internal.identitymaps.IdentityMap getOwningMap()
getOwningMap
in class org.eclipse.persistence.internal.identitymaps.CacheKey
public long getReadTime()
getReadTime
in class org.eclipse.persistence.internal.identitymaps.CacheKey
public Record getRecord()
getRecord
in class org.eclipse.persistence.internal.identitymaps.CacheKey
public org.eclipse.persistence.internal.identitymaps.CacheKey getWrappedCacheKey()
getWrappedCacheKey
in class org.eclipse.persistence.internal.identitymaps.CacheKey
public java.lang.Object getWrapper()
getWrapper
in class org.eclipse.persistence.internal.identitymaps.CacheKey
public java.lang.Object getWriteLockValue()
getWriteLockValue
in class org.eclipse.persistence.internal.identitymaps.CacheKey
public int hashCode()
org.eclipse.persistence.internal.identitymaps.CacheKey
hashCode
in class org.eclipse.persistence.internal.identitymaps.CacheKey
public boolean isAcquired()
org.eclipse.persistence.internal.identitymaps.CacheKey
isAcquired
in class org.eclipse.persistence.internal.identitymaps.CacheKey
public int getInvalidationState()
org.eclipse.persistence.internal.identitymaps.CacheKey
getInvalidationState
in class org.eclipse.persistence.internal.identitymaps.CacheKey
public void release()
release
in class org.eclipse.persistence.internal.identitymaps.CacheKey
public void releaseDeferredLock()
releaseDeferredLock
in class org.eclipse.persistence.internal.identitymaps.CacheKey
public void releaseReadLock()
releaseReadLock
in class org.eclipse.persistence.internal.identitymaps.CacheKey
public java.lang.Object removeFromOwningMap()
removeFromOwningMap
in class org.eclipse.persistence.internal.identitymaps.CacheKey
public void setInvalidationState(int invalidationState)
org.eclipse.persistence.internal.identitymaps.CacheKey
setInvalidationState
in class org.eclipse.persistence.internal.identitymaps.CacheKey
public void setLastUpdatedQueryId(long id)
org.eclipse.persistence.internal.identitymaps.CacheKey
setLastUpdatedQueryId
in class org.eclipse.persistence.internal.identitymaps.CacheKey
public void setKey(java.util.Vector key)
setKey
in class org.eclipse.persistence.internal.identitymaps.CacheKey
public void setMutex(org.eclipse.persistence.internal.helper.ConcurrencyManager mutex)
org.eclipse.persistence.internal.identitymaps.CacheKey
setMutex
in class org.eclipse.persistence.internal.identitymaps.CacheKey
public void setObject(java.lang.Object object)
setObject
in class org.eclipse.persistence.internal.identitymaps.CacheKey
public void setOwningMap(org.eclipse.persistence.internal.identitymaps.AbstractIdentityMap map)
public void setReadTime(long readTime)
org.eclipse.persistence.internal.identitymaps.CacheKey
setReadTime
in class org.eclipse.persistence.internal.identitymaps.CacheKey
public void setRecord(Record newRecord)
setRecord
in class org.eclipse.persistence.internal.identitymaps.CacheKey
public void setWrapper(java.lang.Object wrapper)
setWrapper
in class org.eclipse.persistence.internal.identitymaps.CacheKey
public void setWriteLockValue(java.lang.Object writeLockValue)
setWriteLockValue
in class org.eclipse.persistence.internal.identitymaps.CacheKey
public java.lang.String toString()
toString
in class org.eclipse.persistence.internal.identitymaps.CacheKey
public void updateAccess()
org.eclipse.persistence.internal.identitymaps.CacheKey
updateAccess
in class org.eclipse.persistence.internal.identitymaps.CacheKey
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |