Class NodeFactory.SStW<K,V>
- java.lang.Object
-
- com.github.benmanes.caffeine.cache.NodeFactory.SSt<K,V>
-
- com.github.benmanes.caffeine.cache.NodeFactory.SStW<K,V>
-
- All Implemented Interfaces:
AccessOrderDeque.AccessOrder<Node<K,V>>,Node<K,V>,WriteOrderDeque.WriteOrder<Node<K,V>>
- Direct Known Subclasses:
NodeFactory.SStWMS,NodeFactory.SStWMW,NodeFactory.SStWR
- Enclosing class:
- NodeFactory
static class NodeFactory.SStW<K,V> extends NodeFactory.SSt<K,V>
-
-
Field Summary
Fields Modifier and Type Field Description private Node<K,V>nextInWriteOrderprivate Node<K,V>previousInWriteOrderprotected static longWRITE_TIME_OFFSETprivate longwriteTime-
Fields inherited from class com.github.benmanes.caffeine.cache.NodeFactory.SSt
KEY_OFFSET, VALUE_OFFSET
-
-
Constructor Summary
Constructors Constructor Description SStW(java.lang.Object keyReference, V value, java.lang.ref.ReferenceQueue<V> valueReferenceQueue, int weight, long now)SStW(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.longgetWriteTime()Returns the time that this entry was last written, in ns.voidsetNextInWriteOrder(Node<K,V> nextInWriteOrder)Sets the next element or null if there is no link.voidsetPreviousInWriteOrder(Node<K,V> previousInWriteOrder)Sets the previous element or null if there is no link.voidsetWriteTime(long writeTime)Sets the write time in nanoseconds.-
Methods inherited from class com.github.benmanes.caffeine.cache.NodeFactory.SSt
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
-
-
-
-
Method Detail
-
getWriteTime
public final long getWriteTime()
Description copied from interface:NodeReturns the time that this entry was last written, in ns.
-
setWriteTime
public final void setWriteTime(long writeTime)
Description copied from interface:NodeSets 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.WriteOrderRetrieves 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.WriteOrderSets the previous element or null if there is no link.
-
getNextInWriteOrder
public final Node<K,V> getNextInWriteOrder()
Description copied from interface:WriteOrderDeque.WriteOrderRetrieves 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.WriteOrderSets the next element or null if there is no link.
-
-