Class PWR<K,V>

All Implemented Interfaces:
AccessOrderDeque.AccessOrder<Node<K,V>>, NodeFactory<K,V>, WriteOrderDeque.WriteOrder<Node<K,V>>
Direct Known Subclasses:
PWRMS, PWRMW

class PWR<K,V> extends PW<K,V>
WARNING: GENERATED CODE A cache entry that provides the following features:
  • RefreshWrite
  • StrongKeys (inherited)
  • WeakValues (inherited)
  • Field Details

    • WRITE_TIME_OFFSET

      protected static final long WRITE_TIME_OFFSET
    • writeTime

      volatile long writeTime
  • Constructor Details

  • Method Details

    • getWriteTime

      public final long getWriteTime()
      Description copied from class: Node
      Returns the time that this entry was last written, in ns.
      Overrides:
      getWriteTime in class Node<K,V>
    • setWriteTime

      public final void setWriteTime(long writeTime)
      Description copied from class: Node
      Sets the write time in nanoseconds. This update may be set lazily and rely on the memory fence when the lock is released.
      Overrides:
      setWriteTime in class Node<K,V>
    • casWriteTime

      public final boolean casWriteTime(long expect, long update)
      Description copied from class: Node
      Atomically sets the write time to the given updated value if the current value equals the expected value and returns if the update was successful.
      Overrides:
      casWriteTime in class Node<K,V>
    • newNode

      public Node<K,V> newNode(K key, ReferenceQueue<K> keyReferenceQueue, V value, ReferenceQueue<V> valueReferenceQueue, int weight, long now)
      Description copied from interface: NodeFactory
      Returns a node optimized for the specified features.
      Specified by:
      newNode in interface NodeFactory<K,V>
      Overrides:
      newNode in class PW<K,V>
    • newNode

      public Node<K,V> newNode(Object keyReference, V value, ReferenceQueue<V> valueReferenceQueue, int weight, long now)
      Description copied from interface: NodeFactory
      Returns a node optimized for the specified features.
      Specified by:
      newNode in interface NodeFactory<K,V>
      Overrides:
      newNode in class PW<K,V>