Class SoftCacheKey
- java.lang.Object
-
- org.eclipse.persistence.internal.helper.ConcurrencyManager
-
- org.eclipse.persistence.internal.identitymaps.CacheKey
-
- org.eclipse.persistence.internal.identitymaps.WeakCacheKey
-
- org.eclipse.persistence.internal.identitymaps.SoftCacheKey
-
- All Implemented Interfaces:
Serializable
,Cloneable
public class SoftCacheKey extends WeakCacheKey
Purpose: Container class for storing objects in an IdentityMap. The soft cache key uses a soft reference to allow garbage collection of its object. The cache key itself however will remain and thus should cleaned up every now and then.
Responsibilities:
- Hold key and object.
- Maintain and update the current writeLockValue.
- Since:
- TopLink 11g
- Author:
- James Sutherland
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.eclipse.persistence.internal.identitymaps.WeakCacheKey
reference
-
Fields inherited from class org.eclipse.persistence.internal.identitymaps.CacheKey
CACHE_KEY_INVALID, CHECK_INVALIDATION_POLICY, CREATION_THREAD_HASHCODE, CREATION_THREAD_ID, CREATION_THREAD_NAME, invalidationState, isIsolated, isWrapper, key, lastUpdatedQueryId, mapOwner, MAX_WAIT_TRIES, object, protectedForeignKeys, readTime, record, transactionId, wrapper, writeLockValue
-
Fields inherited from class org.eclipse.persistence.internal.helper.ConcurrencyManager
activeThread, DEFERRED_LOCK_MANAGERS, depth, lockedByMergeManager, numberOfReaders, numberOfWritersWaiting, shouldTrackStack, stack
-
-
Constructor Summary
Constructors Constructor Description SoftCacheKey(Object primaryKey, Object object, Object writeLockValue, long readTime, boolean isIsolated)
Initialize the newly allocated instance of this class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
setObject(Object object)
-
Methods inherited from class org.eclipse.persistence.internal.identitymaps.WeakCacheKey
getObject
-
Methods inherited from class org.eclipse.persistence.internal.identitymaps.CacheKey
acquire, acquire, acquireDeferredLock, acquireIfUnownedNoWait, acquireLock, acquireNoWait, acquireNoWait, acquireReadLock, acquireReadLockNoWait, acquireWithWait, checkDeferredLock, checkReadLock, clone, equals, equals, getActiveThread, getInvalidationState, getKey, getLastUpdatedQueryId, getOwningMap, getProtectedForeignKeys, getReadTime, getRecord, getTransactionId, getWrappedCacheKey, getWrapper, getWriteLockValue, hashCode, hasProtectedForeignKeys, isIsolated, isWrapper, release, releaseDeferredLock, releaseReadLock, removeFromOwningMap, setInvalidationState, setIsolated, setIsWrapper, setKey, setLastUpdatedQueryId, setOwningMap, setProtectedForeignKeys, setReadTime, setRecord, setTransactionId, setWrapper, setWriteLockValue, toString, updateAccess, waitForObject
-
Methods inherited from class org.eclipse.persistence.internal.helper.ConcurrencyManager
acquireIfUnownedNoWait, addReadLockToReadLockManager, clearJustificationWhyMethodIsBuildingObjectCompleteReturnsFalse, enrichStringBuildingExplainWhyThreadIsStuckInIsBuildObjectOnThreadComplete, getConcurrencyManagerCreationDate, getConcurrencyManagerId, getDeferredLockManager, getDeferredLockManagers, getDepth, getNumberOfReaders, getNumberOfWritersWaiting, getReadLockManager, getReadLockManagerEnsureResultIsNotNull, getReadLockManagers, getStack, getThreadsToWaitOnAcquire, getThreadsToWaitOnAcquireMethodName, getThreadsToWaitOnAcquireReadLock, getThreadsToWaitOnAcquireReadLockMethodName, getThreadsWaitingToReleaseDeferredLocks, getThreadsWaitingToReleaseDeferredLocksJustification, getTotalNumberOfKeysAcquiredForReading, getTotalNumberOfKeysReleasedForReading, getTotalNumberOfKeysReleasedForReadingBlewUpExceptionDueToCacheKeyHavingReachedCounterZero, initializeDeferredLockManagers, isAcquired, isBuildObjectOnThreadComplete, isLockedByMergeManager, isNested, putDeferredLock, putThreadAsWaitingToAcquireLockForReading, putThreadAsWaitingToAcquireLockForWriting, releaseAllLocksAcquiredByThread, removeDeferredLockManager, removeReadLockFromReadLockManager, removeReadLockManagerIfEmpty, removeThreadNoLongerWaitingToAcquireLockForReading, removeThreadNoLongerWaitingToAcquireLockForWriting, setActiveThread, setDepth, setIsLockedByMergeManager, setJustificationWhyMethodIsBuildingObjectCompleteReturnsFalse, setNumberOfReaders, setNumberOfWritersWaiting, setShouldTrackStack, setStack, shouldTrackStack, transitionToDeferredLock
-
-
-
-
Constructor Detail
-
SoftCacheKey
public SoftCacheKey(Object primaryKey, Object object, Object writeLockValue, long readTime, boolean isIsolated)
Initialize the newly allocated instance of this class.- Parameters:
primaryKey
- contains values extracted from the objectwriteLockValue
- is the write lock value, null if optimistic locking not being used for this object.readTime
- the time EclipseLInk read the cache key
-
-
Method Detail
-
setObject
public void setObject(Object object)
- Overrides:
setObject
in classWeakCacheKey
-
-