All Implemented Interfaces:
Serializable, Cloneable
Direct Known Subclasses:
HardCacheWeakIdentityMap.ReferenceCacheKey, QueueableWeakCacheKey, SoftCacheKey

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

Responsibilities:

  • Hold key and object.
  • Maintain and update the current writeLockValue.
Since:
TOPLink/Java 1.0
See Also:
  • Field Details

    • reference

      protected Reference reference
      Reference is maintained weak to allow garbage collection
  • Constructor Details

    • WeakCacheKey

      public WeakCacheKey(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 object
      writeLockValue - is the write lock value, null if optimistic locking not being used for this object.
      readTime - the time EclipseLInk read the cache key
  • Method Details