public class WeakCacheKey extends CacheKey
Purpose: Container class for storing objects in an IdentityMap. The weak cache key uses a weak reference to allow garbage collection of its object. The cache key itself however will remain and thus should cleaned up every no and then.
Responsibilities:
Modifier and Type | Field and Description |
---|---|
protected WeakReference |
reference
Reference is maintained weak to allow garbage collection
|
CACHE_KEY_INVALID, CHECK_INVALIDATION_POLICY, hash, invalidationState, key, lastUpdatedQueryId, mapOwner, mutex, object, readTime, record, wrapper, writeLockValue
Constructor and Description |
---|
WeakCacheKey(Vector primaryKey,
Object object,
Object writeLockValue,
long readTime)
Initialize the newly allocated instance of this class.
|
Modifier and Type | Method and Description |
---|---|
Object |
getObject() |
WeakReference |
getReference() |
void |
setObject(Object object) |
protected void |
setReference(WeakReference reference) |
acquire, acquire, acquireDeferredLock, acquireNoWait, acquireNoWait, acquireReadLock, acquireReadLockNoWait, checkReadLock, clone, computeHash, equals, equals, getInvalidationState, getKey, getLastUpdatedQueryId, getMutex, getOwningMap, getReadTime, getRecord, getWrapper, getWriteLockValue, hashCode, isAcquired, release, releaseDeferredLock, releaseReadLock, setInvalidationState, setKey, setLastUpdatedQueryId, setMutex, setOwningMap, setReadTime, setRecord, setWrapper, setWriteLockValue, toString, updateAccess
protected WeakReference reference
public WeakCacheKey(Vector primaryKey, Object object, Object writeLockValue, long readTime)
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 TopLInk read the cache keypublic WeakReference getReference()
protected void setReference(WeakReference reference)
Copyright © 2023. All rights reserved.