Class LRUHybridCache.HybridCacheEntryImpl<V1>

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private boolean dropMe  
      private K key  
      private V1 value  
    • Constructor Summary

      Constructors 
      Constructor Description
      HybridCacheEntryImpl​(K key, V1 value, boolean dropMe)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean dropMe()
      Tell the cache if this entry should be dropped as opposed to being kept in the cache.
      boolean equals​(java.lang.Object obj)  
      V1 getValue()
      Getter for this cache entry internal value.
      int hashCode()  
      void removeFromCache()
      Call this method on this entry to remove it from the LRUCache.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • key

        private final K key
      • value

        private final V1 value
      • dropMe

        private final boolean dropMe
    • Constructor Detail

      • HybridCacheEntryImpl

        public HybridCacheEntryImpl​(K key,
                                    V1 value,
                                    boolean dropMe)
    • Method Detail

      • dropMe

        public boolean dropMe()
        Description copied from interface: HybridCacheEntry
        Tell the cache if this entry should be dropped as opposed to being kept in the cache.
        Specified by:
        dropMe in interface HybridCacheEntry<V1>
        Returns:
        true if the entry should not be cached.
      • removeFromCache

        public void removeFromCache()
        Description copied from interface: CacheEntry
        Call this method on this entry to remove it from the LRUCache. If this entry has already been removed this method will do nothing.
        Specified by:
        removeFromCache in interface CacheEntry
      • hashCode

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

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object