Class NodeFactory.WSoWMW<K,V>
- java.lang.Object
-
- com.github.benmanes.caffeine.cache.NodeFactory.WSo<K,V>
-
- com.github.benmanes.caffeine.cache.NodeFactory.WSoW<K,V>
-
- com.github.benmanes.caffeine.cache.NodeFactory.WSoWMW<K,V>
-
- All Implemented Interfaces:
AccessOrderDeque.AccessOrder<Node<K,V>>
,Node<K,V>
,WriteOrderDeque.WriteOrder<Node<K,V>>
- Enclosing class:
- NodeFactory
static final class NodeFactory.WSoWMW<K,V> extends NodeFactory.WSoW<K,V>
-
-
Field Summary
Fields Modifier and Type Field Description private Node<K,V>
nextInAccessOrder
private int
policyWeight
private Node<K,V>
previousInAccessOrder
private int
queueType
private int
weight
-
Fields inherited from class com.github.benmanes.caffeine.cache.NodeFactory.WSoW
WRITE_TIME_OFFSET
-
Fields inherited from class com.github.benmanes.caffeine.cache.NodeFactory.WSo
KEY_OFFSET, VALUE_OFFSET
-
-
Constructor Summary
Constructors Constructor Description WSoWMW(java.lang.Object keyReference, V value, java.lang.ref.ReferenceQueue<V> valueReferenceQueue, int weight, long now)
WSoWMW(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.int
getPolicyWeight()
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.int
getQueueType()
Returns the queue that the entry's resides in (eden, probation, or protected).int
getWeight()
Returns the weight of this entry from the entry's perspective.void
setNextInAccessOrder(Node<K,V> nextInAccessOrder)
Sets the next element or null if there is no link.void
setPolicyWeight(int policyWeight)
Sets the weight from the policy's perspective.void
setPreviousInAccessOrder(Node<K,V> previousInAccessOrder)
Sets the previous element or null if there is no link.void
setQueueType(int queueType)
Set queue that the entry resides in (eden, probation, or protected).void
setWeight(int weight)
Sets the weight from the entry's perspective.-
Methods inherited from class com.github.benmanes.caffeine.cache.NodeFactory.WSoW
getNextInWriteOrder, getPreviousInWriteOrder, getWriteTime, setNextInWriteOrder, setPreviousInWriteOrder, setWriteTime
-
Methods inherited from class com.github.benmanes.caffeine.cache.NodeFactory.WSo
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, inEden, inMainProbation, inMainProtected, makeMainProbation, makeMainProtected, setAccessTime
-
-
-
-
Method Detail
-
getQueueType
public final int getQueueType()
Description copied from interface:Node
Returns the queue that the entry's resides in (eden, probation, or protected).
-
setQueueType
public final void setQueueType(int queueType)
Description copied from interface:Node
Set queue that the entry resides in (eden, probation, or protected).
-
getWeight
public final int getWeight()
Description copied from interface:Node
Returns the weight of this entry from the entry's perspective.
-
setWeight
public final void setWeight(int weight)
Description copied from interface:Node
Sets the weight from the entry's perspective.
-
getPolicyWeight
public final int getPolicyWeight()
Description copied from interface:Node
Returns the weight of this entry from the policy's perspective.
-
setPolicyWeight
public final void setPolicyWeight(int policyWeight)
Description copied from interface:Node
Sets the weight from the policy's perspective.
-
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.
-
-