Class LRUCacheEntry<T>

  • Type Parameters:
    T - the type of entry keys maintained by the cache.

    public class LRUCacheEntry<T>
    extends java.lang.Object
    Cache entry of LRUCache. Instances of this class are immutable.
    • Constructor Summary

      Constructors 
      Constructor Description
      LRUCacheEntry​(T key, long weight, java.time.Instant lastAccessInstant)  
    • Constructor Detail

      • LRUCacheEntry

        public LRUCacheEntry​(T key,
                             long weight,
                             java.time.Instant lastAccessInstant)
                      throws java.lang.IllegalArgumentException
        Parameters:
        key - entry key
        weight - the weight of the cache entry to be reserved.
        lastAccessInstant - last used instant of the entry.
        Throws:
        java.lang.IllegalArgumentException - when provided parameters have illegal values.
    • Method Detail

      • getKey

        public T getKey()
      • getWeight

        public long getWeight()
      • getLastAccessInstant

        public java.time.Instant getLastAccessInstant()