Class NodeFactory.WW<K,V>

java.lang.Object
com.github.benmanes.caffeine.cache.NodeFactory.WW<K,V>
All Implemented Interfaces:
AccessOrderDeque.AccessOrder<Node<K,V>>, Node<K,V>, WriteOrderDeque.WriteOrder<Node<K,V>>
Direct Known Subclasses:
NodeFactory.WWA, NodeFactory.WWMS, NodeFactory.WWMW, NodeFactory.WWR, NodeFactory.WWW
Enclosing class:
NodeFactory

static class NodeFactory.WW<K,V> extends Object implements Node<K,V>
  • Field Details

  • Constructor Details

  • Method Details

    • getKey

      public final K getKey()
      Description copied from interface: Node
      Return the key or null if it has been reclaimed by the garbage collector.
      Specified by:
      getKey in interface Node<K,V>
    • getKeyReference

      public final Object getKeyReference()
      Description copied from interface: Node
      Returns the reference that the cache is holding the entry by. This is either the key if strongly held or a WeakReference to that key.
      Specified by:
      getKeyReference in interface Node<K,V>
    • getValue

      public final V getValue()
      Description copied from interface: Node
      Return the value or null if it has been reclaimed by the garbage collector.
      Specified by:
      getValue in interface Node<K,V>
    • getValueReference

      public final Object getValueReference()
      Description copied from interface: Node
      Returns the reference to the value. This is either the value if strongly held or a Reference to that value.
      Specified by:
      getValueReference in interface Node<K,V>
    • setValue

      public final void setValue(V value, ReferenceQueue<V> referenceQueue)
      Description copied from interface: Node
      Sets the value, which may be held strongly, weakly, or softly. This update may be set lazily and rely on the memory fence when the lock is released.
      Specified by:
      setValue in interface Node<K,V>
    • containsValue

      public final boolean containsValue(Object value)
      Description copied from interface: Node
      Returns true if the given objects are considered equivalent. A strongly held value is compared by equality and a weakly or softly held value is compared by identity.
      Specified by:
      containsValue in interface Node<K,V>
    • isAlive

      public final boolean isAlive()
      Description copied from interface: Node
      If the entry is available in the hash-table and page replacement policy.
      Specified by:
      isAlive in interface Node<K,V>
    • isRetired

      public final boolean isRetired()
      Description copied from interface: Node
      If the entry was removed from the hash-table and is awaiting removal from the page replacement policy.
      Specified by:
      isRetired in interface Node<K,V>
    • retire

      public final void retire()
      Description copied from interface: Node
      Sets the node to the retired state.
      Specified by:
      retire in interface Node<K,V>
    • isDead

      public final boolean isDead()
      Description copied from interface: Node
      If the entry was removed from the hash-table and the page replacement policy.
      Specified by:
      isDead in interface Node<K,V>
    • die

      public final void die()
      Description copied from interface: Node
      Sets the node to the dead state.
      Specified by:
      die in interface Node<K,V>
    • toString

      public final String toString()
      Overrides:
      toString in class Object