Class FWRMW<K,V>
- java.lang.Object
-
- com.github.benmanes.caffeine.cache.Node<K,V>
-
- com.github.benmanes.caffeine.cache.FW<K,V>
-
- com.github.benmanes.caffeine.cache.FWR<K,V>
-
- com.github.benmanes.caffeine.cache.FWRMW<K,V>
-
- All Implemented Interfaces:
AccessOrderDeque.AccessOrder<Node<K,V>>
,NodeFactory<K,V>
,WriteOrderDeque.WriteOrder<Node<K,V>>
final class FWRMW<K,V> extends FWR<K,V>
WARNING: GENERATED CODE A cache entry that provides the following features:- MaximumWeight
- WeakKeys (inherited)
- WeakValues (inherited)
- RefreshWrite (inherited)
-
-
Field Summary
Fields Modifier and Type Field Description (package private) Node<K,V>
nextInAccessOrder
(package private) int
policyWeight
(package private) Node<K,V>
previousInAccessOrder
(package private) int
queueType
(package private) int
weight
-
Fields inherited from class com.github.benmanes.caffeine.cache.FWR
WRITE_TIME_OFFSET, writeTime
-
Fields inherited from class com.github.benmanes.caffeine.cache.FW
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 FWRMW()
FWRMW(java.lang.Object keyReference, V value, java.lang.ref.ReferenceQueue<V> valueReferenceQueue, int weight, long now)
FWRMW(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 (window, probation, or protected).int
getWeight()
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.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 (window, probation, or protected).void
setWeight(int weight)
Sets the weight from the entry's perspective.-
Methods inherited from class com.github.benmanes.caffeine.cache.FWR
casWriteTime, getWriteTime, setWriteTime
-
Methods inherited from class com.github.benmanes.caffeine.cache.FW
containsValue, die, getKey, getKeyReference, getValue, getValueReference, isAlive, isDead, isRetired, newLookupKey, newReferenceKey, retire, setValue, weakValues
-
Methods inherited from class com.github.benmanes.caffeine.cache.Node
casVariableTime, getAccessTime, getNextInVariableOrder, getNextInWriteOrder, getPreviousInVariableOrder, getPreviousInWriteOrder, getVariableTime, inMainProbation, inMainProtected, inWindow, makeMainProbation, makeMainProtected, makeWindow, setAccessTime, setNextInVariableOrder, setNextInWriteOrder, setPreviousInVariableOrder, setPreviousInWriteOrder, setVariableTime, 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
softValues
-
-
-
-
Method Detail
-
getQueueType
public int getQueueType()
Description copied from class:Node
Returns the queue that the entry's resides in (window, probation, or protected).- Overrides:
getQueueType
in classNode<K,V>
-
setQueueType
public void setQueueType(int queueType)
Description copied from class:Node
Set queue that the entry resides in (window, probation, or protected).- Overrides:
setQueueType
in classNode<K,V>
-
getWeight
public int getWeight()
Description copied from class:Node
Returns the weight of this entry from the entry's perspective.
-
setWeight
public void setWeight(int weight)
Description copied from class:Node
Sets the weight from the entry's perspective.
-
getPolicyWeight
public int getPolicyWeight()
Description copied from class:Node
Returns the weight of this entry from the policy's perspective.- Overrides:
getPolicyWeight
in classNode<K,V>
-
setPolicyWeight
public void setPolicyWeight(int policyWeight)
Description copied from class:Node
Sets the weight from the policy's perspective.- Overrides:
setPolicyWeight
in classNode<K,V>
-
getPreviousInAccessOrder
public 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.- Specified by:
getPreviousInAccessOrder
in interfaceAccessOrderDeque.AccessOrder<K>
- Overrides:
getPreviousInAccessOrder
in classNode<K,V>
-
setPreviousInAccessOrder
public void setPreviousInAccessOrder(Node<K,V> previousInAccessOrder)
Description copied from interface:AccessOrderDeque.AccessOrder
Sets the previous element or null if there is no link.- Specified by:
setPreviousInAccessOrder
in interfaceAccessOrderDeque.AccessOrder<K>
- Overrides:
setPreviousInAccessOrder
in classNode<K,V>
-
getNextInAccessOrder
public 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.- Specified by:
getNextInAccessOrder
in interfaceAccessOrderDeque.AccessOrder<K>
- Overrides:
getNextInAccessOrder
in classNode<K,V>
-
setNextInAccessOrder
public void setNextInAccessOrder(Node<K,V> nextInAccessOrder)
Description copied from interface:AccessOrderDeque.AccessOrder
Sets the next element or null if there is no link.- Specified by:
setNextInAccessOrder
in interfaceAccessOrderDeque.AccessOrder<K>
- Overrides:
setNextInAccessOrder
in 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:NodeFactory
Returns a node optimized for the specified features.
-
-