Class BaseDescription

    • Constructor Detail

      • BaseDescription

        public BaseDescription​(java.lang.String objectClassName)
      • BaseDescription

        public BaseDescription​(java.lang.String objectClassName,
                               int maxLRUCount)
    • Method Detail

      • getObjectClass

        public 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.
        Specified by:
        getObjectClass in interface ICacheDescription
        Returns:
        the newly created object's object class, or null if there is no such class, and LRU behavior is not desired.
      • getObjectExpirationTime

        public long getObjectExpirationTime​(long currentTime)
        Obtain an expiration time for an object, in milliseconds since epoch. The cache manager will call this method for all objects that are being operated on, so that their expiration timestamps get properly updated to a new time.
        Specified by:
        getObjectExpirationTime in interface ICacheDescription
        Parameters:
        currentTime - is the time of the lookup, in milliseconds since epoch.
        Returns:
        a time in milliseconds for the object to expire, or -1 if there is no expiration desired.