Class NodeFactory.WStA<K,V>
- java.lang.Object
-
- com.github.benmanes.caffeine.cache.NodeFactory.WSt<K,V>
-
- com.github.benmanes.caffeine.cache.NodeFactory.WStA<K,V>
-
- All Implemented Interfaces:
AccessOrderDeque.AccessOrder<Node<K,V>>
,Node<K,V>
,WriteOrderDeque.WriteOrder<Node<K,V>>
- Direct Known Subclasses:
NodeFactory.WStAMS
,NodeFactory.WStAMW
,NodeFactory.WStAR
,NodeFactory.WStAW
- Enclosing class:
- NodeFactory
static class NodeFactory.WStA<K,V> extends NodeFactory.WSt<K,V>
-
-
Field Summary
Fields Modifier and Type Field Description protected static long
ACCESS_TIME_OFFSET
private long
accessTime
private Node<K,V>
nextInAccessOrder
private Node<K,V>
previousInAccessOrder
-
Fields inherited from class com.github.benmanes.caffeine.cache.NodeFactory.WSt
KEY_OFFSET, VALUE_OFFSET
-
-
Constructor Summary
Constructors Constructor Description WStA(java.lang.Object keyReference, V value, java.lang.ref.ReferenceQueue<V> valueReferenceQueue, int weight, long now)
WStA(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 long
getAccessTime()
Returns the time that this entry was last accessed, in ns.Node<K,V>
getNextInAccessOrder()
Retrieves the next element or null if either the element is unlinked or the last element on the deque.Node<K,V>
getPreviousInAccessOrder()
Retrieves the previous element or null if either the element is unlinked or the first element on the deque.void
setAccessTime(long accessTime)
Sets the access time in nanoseconds.void
setNextInAccessOrder(Node<K,V> nextInAccessOrder)
Sets the next element or null if there is no link.void
setPreviousInAccessOrder(Node<K,V> previousInAccessOrder)
Sets the previous element or null if there is no link.-
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, getNextInWriteOrder, getPolicyWeight, getPreviousInWriteOrder, getQueueType, getWeight, getWriteTime, inEden, inMainProbation, inMainProtected, makeMainProbation, makeMainProtected, setNextInWriteOrder, setPolicyWeight, setPreviousInWriteOrder, setQueueType, setWeight, setWriteTime
-
-
-
-
Method Detail
-
getAccessTime
public final long getAccessTime()
Description copied from interface:Node
Returns the time that this entry was last accessed, in ns.
-
setAccessTime
public final void setAccessTime(long accessTime)
Description copied from interface:Node
Sets the access time in nanoseconds. This update may be set lazily and rely on the memory fence when the lock is released.
-
getPreviousInAccessOrder
public final Node<K,V> getPreviousInAccessOrder()
Description copied from interface:AccessOrderDeque.AccessOrder
Retrieves the previous element or null if either the element is unlinked or the first element on the deque.
-
setPreviousInAccessOrder
public final void setPreviousInAccessOrder(Node<K,V> previousInAccessOrder)
Description copied from interface:AccessOrderDeque.AccessOrder
Sets the previous element or null if there is no link.
-
getNextInAccessOrder
public final Node<K,V> getNextInAccessOrder()
Description copied from interface:AccessOrderDeque.AccessOrder
Retrieves the next element or null if either the element is unlinked or the last element on the deque.
-
setNextInAccessOrder
public final void setNextInAccessOrder(Node<K,V> nextInAccessOrder)
Description copied from interface:AccessOrderDeque.AccessOrder
Sets the next element or null if there is no link.
-
-