Class NodeFactory.SSoR<K,V>
- java.lang.Object
-
- com.github.benmanes.caffeine.cache.NodeFactory.SSo<K,V>
-
- com.github.benmanes.caffeine.cache.NodeFactory.SSoR<K,V>
-
- All Implemented Interfaces:
AccessOrderDeque.AccessOrder<Node<K,V>>
,Node<K,V>
,WriteOrderDeque.WriteOrder<Node<K,V>>
- Direct Known Subclasses:
NodeFactory.SSoRMS
,NodeFactory.SSoRMW
- Enclosing class:
- NodeFactory
static class NodeFactory.SSoR<K,V> extends NodeFactory.SSo<K,V>
-
-
Field Summary
Fields Modifier and Type Field Description protected static long
WRITE_TIME_OFFSET
private long
writeTime
-
Fields inherited from class com.github.benmanes.caffeine.cache.NodeFactory.SSo
KEY_OFFSET, VALUE_OFFSET
-
-
Constructor Summary
Constructors Constructor Description SSoR(java.lang.Object keyReference, V value, java.lang.ref.ReferenceQueue<V> valueReferenceQueue, int weight, long now)
SSoR(K key, java.lang.ref.ReferenceQueue<K> keyReferenceQueue, V value, java.lang.ref.ReferenceQueue<V> valueReferenceQueue, int weight, long now)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
casWriteTime(long expect, long update)
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.long
getWriteTime()
Returns the time that this entry was last written, in ns.void
setWriteTime(long writeTime)
Sets the write time in nanoseconds.-
Methods inherited from class com.github.benmanes.caffeine.cache.NodeFactory.SSo
containsValue, die, getKey, getKeyReference, getValue, getValueReference, isAlive, isDead, isRetired, retire, setValue, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.github.benmanes.caffeine.cache.Node
getAccessTime, getNextInAccessOrder, getNextInWriteOrder, getPolicyWeight, getPreviousInAccessOrder, getPreviousInWriteOrder, getQueueType, getWeight, inEden, inMainProbation, inMainProtected, makeMainProbation, makeMainProtected, setAccessTime, setNextInAccessOrder, setNextInWriteOrder, setPolicyWeight, setPreviousInAccessOrder, setPreviousInWriteOrder, setQueueType, setWeight
-
-
-
-
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.
-
-