Top Description Fields Constructors Methods
org.eclipse.persistence.internal.identitymaps

public Class WeakCacheKey

extends CacheKey
Class Inheritance
Known Direct Subclasses
org.eclipse.persistence.internal.identitymaps.HardCacheWeakIdentityMap.ReferenceCacheKey, org.eclipse.persistence.internal.identitymaps.QueueableWeakCacheKey, org.eclipse.persistence.internal.identitymaps.SoftCacheKey
Imports
java.lang.ref.*

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 now and then.

Responsibilities:

Since
TOPLink/Java 1.0

Field Summary

Modifier and TypeField and Description
protected Reference<T>
reference

Reference is maintained weak to allow garbage collection

Inherited from org.eclipse.persistence.internal.identitymaps.CacheKey:
CACHE_KEY_INVALIDCHECK_INVALIDATION_POLICYCREATION_THREAD_HASHCODECREATION_THREAD_IDCREATION_THREAD_NAMEdataRecordinvalidationStateisIsolatedisWrapperkeylastUpdatedQueryIdmapOwnerMAX_WAIT_TRIESobjectprotectedForeignKeysreadTimetransactionIdwrapperwriteLockValue

Constructor Summary

AccessConstructor and Description
public
WeakCacheKey(Object
contains values extracted from the object
primaryKey
,
Object object, Object
is the write lock value, null if optimistic locking not being used for this object.
writeLockValue
,
long
the time EclipseLInk read the cache key
readTime
,
boolean isIsolated)

Initialize the newly allocated instance of this class.

Method Summary

Modifier and TypeMethod and Description
public Object
public void
Inherited from org.eclipse.persistence.internal.identitymaps.CacheKey:
acquireacquireacquireDeferredLockacquireIfUnownedNoWaitacquireLockacquireNoWaitacquireNoWaitacquireReadLockacquireReadLockNoWaitacquireWithWaitcheckDeferredLockcheckReadLockcloneequalsequalsgetActiveThreadgetInvalidationStategetKeygetLastUpdatedQueryIdgetOwningMapgetProtectedForeignKeysgetReadTimegetRecordgetTransactionIdgetWrappedCacheKeygetWrappergetWriteLockValuehashCodehasProtectedForeignKeysisIsolatedisWrapperreleasereleaseDeferredLockreleaseReadLockremoveFromOwningMapsetInvalidationStatesetIsolatedsetIsWrappersetKeysetLastUpdatedQueryIdsetOwningMapsetProtectedForeignKeyssetReadTimesetRecordsetTransactionIdsetWrappersetWriteLockValuetoStringupdateAccesswaitForObject

Field Detail

referenceback to summary
protected Reference<T> reference

Reference is maintained weak to allow garbage collection

Constructor Detail

WeakCacheKeyback to summary
public WeakCacheKey(Object primaryKey, Object object, Object writeLockValue, long readTime, boolean isIsolated)

Initialize the newly allocated instance of this class.

Parameters
primaryKey:Object

contains values extracted from the object

writeLockValue:Object

is the write lock value, null if optimistic locking not being used for this object.

readTime:long

the time EclipseLInk read the cache key

Method Detail

getObjectback to summary
public Object getObject()

Overrides org.eclipse.persistence.internal.identitymaps.CacheKey.getObject.

Annotations
@Override
setObjectback to summary
public void setObject(Object object)

Overrides org.eclipse.persistence.internal.identitymaps.CacheKey.setObject.

Annotations
@Override