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 java.lang.ref.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(java.util.Vector primaryKey,
java.lang.Object object,
java.lang.Object writeLockValue,
long readTime)
Initialize the newly allocated instance of this class.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
getObject() |
java.lang.ref.WeakReference |
getReference() |
void |
setObject(java.lang.Object object) |
protected void |
setReference(java.lang.ref.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, updateAccessprotected java.lang.ref.WeakReference reference
public WeakCacheKey(java.util.Vector primaryKey,
java.lang.Object object,
java.lang.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 key