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