Interface ICacheDescription

    • Method Detail

      • getObjectKeys

        StringSet getObjectKeys()
        Get the cache keys for an object (which may or may not exist yet in the cache). This method is called in order for cache manager to throw the correct locks.
        Returns:
        the object's cache keys, or null if the object should not be cached.
      • getCriticalSectionName

        java.lang.String getCriticalSectionName()
        Get the critical section name for this description object. This is used to synchronize creation of the described object, and thus is used only for objects that will be cached. This method does not need to return decent results for objects that are never cached.
        Returns:
        the critical section name.
      • getObjectClass

        ICacheClass getObjectClass()
        Get the object class for an object. The object class is used to determine the group of objects treated in the same LRU manner.
        Returns:
        the newly created object's object class, or null if there is no such class, and LRU behavior is not desired.
      • getObjectExpirationTime

        long getObjectExpirationTime​(long currentTime)
        Obtain an expiration time for an object, in milliseconds since epoch. The cache manager will call this method whenever the object is being looked up, so that its expiration timestamps can be properly updated to a new time.
        Parameters:
        currentTime - is the time of the lookup, in milliseconds since epoch.
        Returns:
        a time in milliseconds since epoch for the object to expire, or -1 if there is no expiration desired.