Class LRUHybridCache.HybridCacheEntryImpl<V1>

java.lang.Object
org.glassfish.hk2.utilities.cache.LRUHybridCache.HybridCacheEntryImpl<V1>
All Implemented Interfaces:
CacheEntry, HybridCacheEntry<V1>
Enclosing class:
LRUHybridCache<K,V>

private final class LRUHybridCache.HybridCacheEntryImpl<V1> extends Object implements HybridCacheEntry<V1>
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final boolean
     
    private final K
     
    private final V1
     
  • Constructor Summary

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

    Modifier and Type
    Method
    Description
    boolean
    Tell the cache if this entry should be dropped as opposed to being kept in the cache.
    boolean
     
    Getter for this cache entry internal value.
    int
     
    void
    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 Details

    • key

      private final K key
    • value

      private final V1 value
    • dropMe

      private final boolean dropMe
  • Constructor Details

    • HybridCacheEntryImpl

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

    • getValue

      public V1 getValue()
      Description copied from interface: HybridCacheEntry
      Getter for this cache entry internal value.
      Specified by:
      getValue in interface HybridCacheEntry<V1>
      Returns:
      Internal value.
    • 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 Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object