Class SoftCacheKey

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.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
    • Constructor Detail

      • SoftCacheKey

        public SoftCacheKey​(java.lang.Object primaryKey,
                            java.lang.Object object,
                            java.lang.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 Detail

      • setObject

        public void setObject​(java.lang.Object object)
        Overrides:
        setObject in class WeakCacheKey