Class SoftCache.ValueCell<K,​V>

  • Enclosing class:
    SoftCache<K,​V>

    private static class SoftCache.ValueCell<K,​V>
    extends java.lang.ref.SoftReference<V>
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static int dropped  
      private K key  
      private boolean keyIsValid  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private ValueCell​(K key, V value, java.lang.ref.ReferenceQueue<V> queue)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private static <K,​V>
      SoftCache.ValueCell<K,​V>
      create​(K key, V value, java.lang.ref.ReferenceQueue<V> queue)  
      private void drop()  
      private boolean isValid()  
      private static <K,​V>
      V
      strip​(SoftCache.ValueCell<K,​V> val, boolean drop)  
      • Methods inherited from class java.lang.ref.SoftReference

        get
      • Methods inherited from class java.lang.ref.Reference

        clear, clone, enqueue, isEnqueued, reachabilityFence
      • Methods inherited from class java.lang.Object

        equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • dropped

        private static int dropped
      • keyIsValid

        private boolean keyIsValid
      • key

        private K key
    • Constructor Detail

      • ValueCell

        private ValueCell​(K key,
                          V value,
                          java.lang.ref.ReferenceQueue<V> queue)
    • Method Detail

      • create

        private static <K,​V> SoftCache.ValueCell<K,​V> create​(K key,
                                                                         V value,
                                                                         java.lang.ref.ReferenceQueue<V> queue)
      • isValid

        private boolean isValid()
      • drop

        private void drop()