Class ImmortalCacheValue

    • Field Detail

      • value

        public java.lang.Object value
    • Constructor Detail

      • ImmortalCacheValue

        public ImmortalCacheValue​(java.lang.Object value)
    • Method Detail

      • setValue

        public final java.lang.Object setValue​(java.lang.Object value)
      • getValue

        public java.lang.Object getValue()
        Specified by:
        getValue in interface InternalCacheValue
        Returns:
        the value represented by this internal wrapper
      • isExpired

        public boolean isExpired​(long now)
        Specified by:
        isExpired in interface InternalCacheValue
        Parameters:
        now - the current time as expressed by System.currentTimeMillis()
        Returns:
        true if the entry has expired; false otherwise
      • canExpire

        public boolean canExpire()
        Specified by:
        canExpire in interface InternalCacheValue
        Returns:
        true if the entry can expire, false otherwise
      • getCreated

        public long getCreated()
        Specified by:
        getCreated in interface InternalCacheValue
        Returns:
        timestamp when the entry was created
      • getLastUsed

        public long getLastUsed()
        Specified by:
        getLastUsed in interface InternalCacheValue
        Returns:
        timestamp when the entry was last used
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object