Class TimerWheel.Sentinel<K,V>
java.lang.Object
com.github.benmanes.caffeine.cache.Node<K,V>
com.github.benmanes.caffeine.cache.TimerWheel.Sentinel<K,V>
- All Implemented Interfaces:
AccessOrderDeque.AccessOrder<Node<K,V>>, WriteOrderDeque.WriteOrder<Node<K, V>>
- Enclosing class:
TimerWheel<K,V>
A sentinel for the doubly-linked list in the bucket.
-
Field Summary
FieldsModifier and TypeFieldDescription -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancontainsValue(Object value) Returnstrueif the given objects are considered equivalent.voiddie()Sets the node to the dead state.@Nullable KgetKey()Return the key ornullif it has been reclaimed by the garbage collector.Returns the reference that the cache is holding the entry by.@Nullable VgetValue()Return the value ornullif it has been reclaimed by the garbage collector.Returns the reference to the value.booleanisAlive()If the entry is available in the hash-table and page replacement policy.booleanisDead()If the entry was removed from the hash-table and the page replacement policy.booleanIf the entry was removed from the hash-table and is awaiting removal from the page replacement policy.voidretire()Sets the node to the retired state.voidsetNextInVariableOrder(@Nullable Node<K, V> next) voidsetPreviousInVariableOrder(@Nullable Node<K, V> prev) voidsetValue(V value, @Nullable ReferenceQueue<V> referenceQueue) Sets the value, which may be held strongly, weakly, or softly.Methods inherited from class Node
casVariableTime, casWriteTime, getAccessTime, getNextInAccessOrder, getNextInWriteOrder, getPolicyWeight, getPreviousInAccessOrder, getPreviousInWriteOrder, getQueueType, getVariableTime, getWeight, getWriteTime, inMainProbation, inMainProtected, inWindow, makeMainProbation, makeMainProtected, makeWindow, setAccessTime, setNextInAccessOrder, setNextInWriteOrder, setPolicyWeight, setPreviousInAccessOrder, setPreviousInWriteOrder, setQueueType, setVariableTime, setWeight, setWriteTime, toString
-
Field Details
-
prev
-
next
-
-
Constructor Details
-
Sentinel
Sentinel()
-
-
Method Details
-
getPreviousInVariableOrder
-
setPreviousInVariableOrder
-
getNextInVariableOrder
-
setNextInVariableOrder
-
getKey
-
getKeyReference
Description copied from class:NodeReturns the reference that the cache is holding the entry by. This is either the key if strongly held or aWeakReferenceto that key.- Specified by:
getKeyReferencein classNode<K,V>
-
getValue
-
getValueReference
-
setValue
Description copied from class:NodeSets the value, which may be held strongly, weakly, or softly. This update may be set lazily and rely on the memory fence when the lock is released. -
containsValue
-
isAlive
-
isRetired
-
isDead
-
retire
-
die
-