Class PSRMS<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.PSR<K,V>
-
- com.github.benmanes.caffeine.cache.PSRMS<K,V>
-
- All Implemented Interfaces:
AccessOrderDeque.AccessOrder<Node<K,V>>
,NodeFactory<K,V>
,WriteOrderDeque.WriteOrder<Node<K,V>>
final class PSRMS<K,V> extends PSR<K,V>
WARNING: GENERATED CODE A cache entry that provides the following features:- MaximumSize
- StrongKeys (inherited)
- StrongValues (inherited)
- RefreshWrite (inherited)
-
-
Field Summary
Fields Modifier and Type Field Description (package private) Node<K,V>
nextInAccessOrder
(package private) Node<K,V>
previousInAccessOrder
(package private) int
queueType
-
Fields inherited from class com.github.benmanes.caffeine.cache.PSR
WRITE_TIME_OFFSET, writeTime
-
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
Constructors Constructor Description PSRMS()
PSRMS(java.lang.Object keyReference, V value, java.lang.ref.ReferenceQueue<V> valueReferenceQueue, int weight, long now)
PSRMS(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.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).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
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).-
Methods inherited from class com.github.benmanes.caffeine.cache.PSR
casWriteTime, getWriteTime, setWriteTime
-
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
casVariableTime, getAccessTime, getNextInVariableOrder, getNextInWriteOrder, getPolicyWeight, getPreviousInVariableOrder, getPreviousInWriteOrder, getVariableTime, getWeight, inMainProbation, inMainProtected, inWindow, makeMainProbation, makeMainProtected, makeWindow, setAccessTime, setNextInVariableOrder, setNextInWriteOrder, setPolicyWeight, setPreviousInVariableOrder, setPreviousInWriteOrder, setVariableTime, setWeight, 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
-
-
-
-
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>
-
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.
-
-