Class PDMW<K,V>
- java.lang.Object
-
- com.github.benmanes.caffeine.cache.Node<K,V>
-
- com.github.benmanes.caffeine.cache.PD<K,V>
-
- com.github.benmanes.caffeine.cache.PDMW<K,V>
-
- All Implemented Interfaces:
AccessOrderDeque.AccessOrder<Node<K,V>>,NodeFactory<K,V>,WriteOrderDeque.WriteOrder<Node<K,V>>
final class PDMW<K,V> extends PD<K,V>
WARNING: GENERATED CODE A cache entry that provides the following features:- MaximumWeight
- StrongKeys (inherited)
- SoftValues (inherited)
-
-
Field Summary
Fields Modifier and Type Field Description (package private) Node<K,V>nextInAccessOrder(package private) intpolicyWeight(package private) Node<K,V>previousInAccessOrder(package private) intqueueType(package private) intweight-
Fields inherited from class com.github.benmanes.caffeine.cache.PD
value, VALUE_OFFSET
-
Fields inherited from interface com.github.benmanes.caffeine.cache.NodeFactory
DEAD_STRONG_KEY, DEAD_WEAK_KEY, RETIRED_STRONG_KEY, RETIRED_WEAK_KEY
-
-
Constructor Summary
Constructors Constructor Description PDMW()PDMW(java.lang.Object keyReference, V value, java.lang.ref.ReferenceQueue<V> valueReferenceQueue, int weight, long now)PDMW(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>getNextInAccessOrder()Retrieves the next element or null if either the element is unlinked or the last element on the deque.intgetPolicyWeight()Returns the weight of this entry from the policy's perspective.Node<K,V>getPreviousInAccessOrder()Retrieves the previous element or null if either the element is unlinked or the first element on the deque.intgetQueueType()Returns the queue that the entry's resides in (window, probation, or protected).intgetWeight()Returns the weight of this entry from the entry's perspective.Node<K,V>newNode(java.lang.Object keyReference, V value, java.lang.ref.ReferenceQueue<V> valueReferenceQueue, int weight, long now)Returns a node optimized for the specified features.Node<K,V>newNode(K key, java.lang.ref.ReferenceQueue<K> keyReferenceQueue, V value, java.lang.ref.ReferenceQueue<V> valueReferenceQueue, int weight, long now)Returns a node optimized for the specified features.voidsetNextInAccessOrder(Node<K,V> nextInAccessOrder)Sets the next element or null if there is no link.voidsetPolicyWeight(int policyWeight)Sets the weight from the policy's perspective.voidsetPreviousInAccessOrder(Node<K,V> previousInAccessOrder)Sets the previous element or null if there is no link.voidsetQueueType(int queueType)Set queue that the entry resides in (window, probation, or protected).voidsetWeight(int weight)Sets the weight from the entry's perspective.-
Methods inherited from class com.github.benmanes.caffeine.cache.PD
containsValue, die, getKey, getKeyReference, getValue, getValueReference, isAlive, isDead, isRetired, retire, setValue, softValues
-
Methods inherited from class com.github.benmanes.caffeine.cache.Node
casVariableTime, casWriteTime, getAccessTime, getNextInVariableOrder, getNextInWriteOrder, getPreviousInVariableOrder, getPreviousInWriteOrder, getVariableTime, getWriteTime, inMainProbation, inMainProtected, inWindow, makeMainProbation, makeMainProtected, makeWindow, setAccessTime, setNextInVariableOrder, setNextInWriteOrder, setPreviousInVariableOrder, setPreviousInWriteOrder, setVariableTime, setWriteTime, 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.NodeFactory
newLookupKey, newReferenceKey, weakValues
-
-
-
-
Method Detail
-
getQueueType
public int getQueueType()
Description copied from class:NodeReturns the queue that the entry's resides in (window, probation, or protected).- Overrides:
getQueueTypein classNode<K,V>
-
setQueueType
public void setQueueType(int queueType)
Description copied from class:NodeSet queue that the entry resides in (window, probation, or protected).- Overrides:
setQueueTypein classNode<K,V>
-
getWeight
public int getWeight()
Description copied from class:NodeReturns the weight of this entry from the entry's perspective.
-
setWeight
public void setWeight(int weight)
Description copied from class:NodeSets the weight from the entry's perspective.
-
getPolicyWeight
public int getPolicyWeight()
Description copied from class:NodeReturns the weight of this entry from the policy's perspective.- Overrides:
getPolicyWeightin classNode<K,V>
-
setPolicyWeight
public void setPolicyWeight(int policyWeight)
Description copied from class:NodeSets the weight from the policy's perspective.- Overrides:
setPolicyWeightin classNode<K,V>
-
getPreviousInAccessOrder
public Node<K,V> getPreviousInAccessOrder()
Description copied from interface:AccessOrderDeque.AccessOrderRetrieves the previous element or null if either the element is unlinked or the first element on the deque.- Specified by:
getPreviousInAccessOrderin interfaceAccessOrderDeque.AccessOrder<K>- Overrides:
getPreviousInAccessOrderin classNode<K,V>
-
setPreviousInAccessOrder
public void setPreviousInAccessOrder(Node<K,V> previousInAccessOrder)
Description copied from interface:AccessOrderDeque.AccessOrderSets the previous element or null if there is no link.- Specified by:
setPreviousInAccessOrderin interfaceAccessOrderDeque.AccessOrder<K>- Overrides:
setPreviousInAccessOrderin classNode<K,V>
-
getNextInAccessOrder
public Node<K,V> getNextInAccessOrder()
Description copied from interface:AccessOrderDeque.AccessOrderRetrieves the next element or null if either the element is unlinked or the last element on the deque.- Specified by:
getNextInAccessOrderin interfaceAccessOrderDeque.AccessOrder<K>- Overrides:
getNextInAccessOrderin classNode<K,V>
-
setNextInAccessOrder
public void setNextInAccessOrder(Node<K,V> nextInAccessOrder)
Description copied from interface:AccessOrderDeque.AccessOrderSets the next element or null if there is no link.- Specified by:
setNextInAccessOrderin interfaceAccessOrderDeque.AccessOrder<K>- Overrides:
setNextInAccessOrderin classNode<K,V>
-
newNode
public Node<K,V> newNode(K key, java.lang.ref.ReferenceQueue<K> keyReferenceQueue, V value, java.lang.ref.ReferenceQueue<V> valueReferenceQueue, int weight, long now)
Description copied from interface:NodeFactoryReturns a node optimized for the specified features.
-
-