Class NodeFactory.WWA<K,V>
java.lang.Object
com.github.benmanes.caffeine.cache.NodeFactory.WW<K,V>
com.github.benmanes.caffeine.cache.NodeFactory.WWA<K,V>
- All Implemented Interfaces:
AccessOrderDeque.AccessOrder<Node<K,
,V>> Node<K,
,V> WriteOrderDeque.WriteOrder<Node<K,
V>>
- Direct Known Subclasses:
NodeFactory.WWAMS
,NodeFactory.WWAMW
,NodeFactory.WWAR
,NodeFactory.WWAW
- Enclosing class:
- NodeFactory
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final long
private long
Fields inherited from class com.github.benmanes.caffeine.cache.NodeFactory.WW
KEY_OFFSET, VALUE_OFFSET
-
Constructor Summary
ConstructorsConstructorDescriptionWWA
(Object keyReference, V value, ReferenceQueue<V> valueReferenceQueue, int weight, long now) WWA
(K key, ReferenceQueue<K> keyReferenceQueue, V value, ReferenceQueue<V> valueReferenceQueue, int weight, long now) -
Method Summary
Modifier and TypeMethodDescriptionfinal long
Returns the time that this entry was last accessed, in ns.Retrieves 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 void
setAccessTime
(long accessTime) Sets the access time in nanoseconds.final void
setNextInAccessOrder
(Node<K, V> nextInAccessOrder) Sets the next element or null if there is no link.final 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.WW
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
-
Field Details
-
ACCESS_TIME_OFFSET
protected static final long ACCESS_TIME_OFFSET -
accessTime
private volatile long accessTime -
previousInAccessOrder
-
nextInAccessOrder
-
-
Constructor Details
-
WWA
WWA(K key, ReferenceQueue<K> keyReferenceQueue, V value, ReferenceQueue<V> valueReferenceQueue, int weight, long now) -
WWA
WWA(Object keyReference, V value, ReferenceQueue<V> valueReferenceQueue, int weight, long now)
-
-
Method Details
-
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
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
Description copied from interface:AccessOrderDeque.AccessOrder
Sets the previous element or null if there is no link. -
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
Description copied from interface:AccessOrderDeque.AccessOrder
Sets the next element or null if there is no link.
-