Class NodeFactory.SStAR<K,​V>

    • Field Detail

      • WRITE_TIME_OFFSET

        protected static final long WRITE_TIME_OFFSET
      • writeTime

        private volatile long writeTime
    • Constructor Detail

      • SStAR

        SStAR​(K key,
              java.lang.ref.ReferenceQueue<K> keyReferenceQueue,
              V value,
              java.lang.ref.ReferenceQueue<V> valueReferenceQueue,
              int weight,
              long now)
      • SStAR

        SStAR​(java.lang.Object keyReference,
              V value,
              java.lang.ref.ReferenceQueue<V> valueReferenceQueue,
              int weight,
              long now)
    • Method Detail

      • getWriteTime

        public final long getWriteTime()
        Description copied from interface: Node
        Returns the time that this entry was last written, in ns.
      • setWriteTime

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

        public final boolean casWriteTime​(long expect,
                                          long update)
        Description copied from interface: 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.