Class NodeFactory.WStW<K,V>
java.lang.Object
com.github.benmanes.caffeine.cache.NodeFactory.WSt<K,V>
com.github.benmanes.caffeine.cache.NodeFactory.WStW<K,V>
- All Implemented Interfaces:
AccessOrderDeque.AccessOrder<Node<K,
,V>> Node<K,
,V> WriteOrderDeque.WriteOrder<Node<K,
V>>
- Direct Known Subclasses:
NodeFactory.WStWMS
,NodeFactory.WStWMW
,NodeFactory.WStWR
- Enclosing class:
- NodeFactory
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final long
private long
Fields inherited from class com.github.benmanes.caffeine.cache.NodeFactory.WSt
KEY_OFFSET, VALUE_OFFSET
-
Constructor Summary
ConstructorsConstructorDescriptionWStW
(Object keyReference, V value, ReferenceQueue<V> valueReferenceQueue, int weight, long now) WStW
(K key, ReferenceQueue<K> keyReferenceQueue, V value, ReferenceQueue<V> valueReferenceQueue, int weight, long now) -
Method Summary
Modifier and TypeMethodDescriptionRetrieves the next element or null if either the element is unlinked or the last element on the deque.Retrieves the previous element or null if either the element is unlinked or the first element on the deque.final long
Returns the time that this entry was last written, in ns.final void
setNextInWriteOrder
(Node<K, V> nextInWriteOrder) Sets the next element or null if there is no link.final void
setPreviousInWriteOrder
(Node<K, V> previousInWriteOrder) Sets the previous element or null if there is no link.final void
setWriteTime
(long writeTime) Sets the write time in nanoseconds.Methods inherited from class com.github.benmanes.caffeine.cache.NodeFactory.WSt
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
casWriteTime, getAccessTime, getNextInAccessOrder, getPolicyWeight, getPreviousInAccessOrder, getQueueType, getWeight, inEden, inMainProbation, inMainProtected, makeMainProbation, makeMainProtected, setAccessTime, setNextInAccessOrder, setPolicyWeight, setPreviousInAccessOrder, setQueueType, setWeight
-
Field Details
-
WRITE_TIME_OFFSET
protected static final long WRITE_TIME_OFFSET -
writeTime
private volatile long writeTime -
previousInWriteOrder
-
nextInWriteOrder
-
-
Constructor Details
-
WStW
WStW(K key, ReferenceQueue<K> keyReferenceQueue, V value, ReferenceQueue<V> valueReferenceQueue, int weight, long now) -
WStW
WStW(Object keyReference, V value, ReferenceQueue<V> valueReferenceQueue, int weight, long now)
-
-
Method Details
-
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. -
getPreviousInWriteOrder
Description copied from interface:WriteOrderDeque.WriteOrder
Retrieves the previous element or null if either the element is unlinked or the first element on the deque. -
setPreviousInWriteOrder
Description copied from interface:WriteOrderDeque.WriteOrder
Sets the previous element or null if there is no link. -
getNextInWriteOrder
Description copied from interface:WriteOrderDeque.WriteOrder
Retrieves the next element or null if either the element is unlinked or the last element on the deque. -
setNextInWriteOrder
Description copied from interface:WriteOrderDeque.WriteOrder
Sets the next element or null if there is no link.
-