Class PSAMW<K,V>
java.lang.Object
com.github.benmanes.caffeine.cache.Node<K,V>
com.github.benmanes.caffeine.cache.PS<K,V>
com.github.benmanes.caffeine.cache.PSA<K,V>
com.github.benmanes.caffeine.cache.PSAMW<K,V>
- All Implemented Interfaces:
AccessOrderDeque.AccessOrder<Node<K,
,V>> NodeFactory<K,
,V> WriteOrderDeque.WriteOrder<Node<K,
V>>
WARNING: GENERATED CODE
A cache entry that provides the following features:
- MaximumWeight
- StrongKeys (inherited)
- StrongValues (inherited)
- ExpireAccess (inherited)
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) int
(package private) int
(package private) int
Fields inherited from class com.github.benmanes.caffeine.cache.PSA
ACCESS_TIME_OFFSET, accessTime, nextInAccessOrder, previousInAccessOrder
Fields inherited from class com.github.benmanes.caffeine.cache.PS
key, KEY_OFFSET, 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
ConstructorsConstructorDescriptionPSAMW()
PSAMW
(Object keyReference, V value, ReferenceQueue<V> valueReferenceQueue, int weight, long now) PSAMW
(K key, ReferenceQueue<K> keyReferenceQueue, V value, ReferenceQueue<V> valueReferenceQueue, int weight, long now) -
Method Summary
Modifier and TypeMethodDescriptionint
Returns the weight of this entry from the policy's perspective.int
Returns the queue that the entry's resides in (window, probation, or protected).int
Returns the weight of this entry from the entry's perspective.newNode
(Object keyReference, V value, ReferenceQueue<V> valueReferenceQueue, int weight, long now) Returns a node optimized for the specified features.newNode
(K key, ReferenceQueue<K> keyReferenceQueue, V value, ReferenceQueue<V> valueReferenceQueue, int weight, long now) Returns a node optimized for the specified features.void
setPolicyWeight
(int policyWeight) Sets the weight from the policy's perspective.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.PSA
casVariableTime, getAccessTime, getNextInAccessOrder, getNextInVariableOrder, getPreviousInAccessOrder, getPreviousInVariableOrder, getVariableTime, setAccessTime, setNextInAccessOrder, setNextInVariableOrder, setPreviousInAccessOrder, setPreviousInVariableOrder, setVariableTime
Methods inherited from class com.github.benmanes.caffeine.cache.PS
containsValue, die, getKey, getKeyReference, getValue, getValueReference, isAlive, isDead, isRetired, retire, setValue
Methods inherited from class com.github.benmanes.caffeine.cache.Node
casWriteTime, getNextInWriteOrder, getPreviousInWriteOrder, getWriteTime, inMainProbation, inMainProtected, inWindow, makeMainProbation, makeMainProtected, makeWindow, setNextInWriteOrder, setPreviousInWriteOrder, 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, softValues, weakValues
-
Field Details
-
queueType
int queueType -
weight
int weight -
policyWeight
int policyWeight
-
-
Constructor Details
-
PSAMW
PSAMW() -
PSAMW
PSAMW(K key, ReferenceQueue<K> keyReferenceQueue, V value, ReferenceQueue<V> valueReferenceQueue, int weight, long now) -
PSAMW
PSAMW(Object keyReference, V value, ReferenceQueue<V> valueReferenceQueue, int weight, long now)
-
-
Method Details
-
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>
-
newNode
public Node<K,V> newNode(K key, ReferenceQueue<K> keyReferenceQueue, V value, ReferenceQueue<V> valueReferenceQueue, int weight, long now) Description copied from interface:NodeFactory
Returns a node optimized for the specified features. -
newNode
public Node<K,V> newNode(Object keyReference, V value, ReferenceQueue<V> valueReferenceQueue, int weight, long now) Description copied from interface:NodeFactory
Returns a node optimized for the specified features.
-