Class FSWR<K,V>
- java.lang.Object
-
- com.github.benmanes.caffeine.cache.Node<K,V>
-
- com.github.benmanes.caffeine.cache.FS<K,V>
-
- com.github.benmanes.caffeine.cache.FSW<K,V>
-
- com.github.benmanes.caffeine.cache.FSWR<K,V>
-
- All Implemented Interfaces:
AccessOrderDeque.AccessOrder<Node<K,V>>
,NodeFactory<K,V>
,WriteOrderDeque.WriteOrder<Node<K,V>>
class FSWR<K,V> extends FSW<K,V>
WARNING: GENERATED CODE A cache entry that provides the following features:- RefreshWrite
- WeakKeys (inherited)
- StrongValues (inherited)
- ExpireWrite (inherited)
-
-
Field Summary
-
Fields inherited from class com.github.benmanes.caffeine.cache.FSW
nextInWriteOrder, previousInWriteOrder, WRITE_TIME_OFFSET, writeTime
-
Fields inherited from class com.github.benmanes.caffeine.cache.FS
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 FSWR()
FSWR(java.lang.Object keyReference, V value, java.lang.ref.ReferenceQueue<V> valueReferenceQueue, int weight, long now)
FSWR(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 boolean
casWriteTime(long expect, long update)
Atomically sets the write time to the given updated value if the current value equals the expected value and returns if the update was successful.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.-
Methods inherited from class com.github.benmanes.caffeine.cache.FSW
casVariableTime, getNextInVariableOrder, getNextInWriteOrder, getPreviousInVariableOrder, getPreviousInWriteOrder, getVariableTime, getWriteTime, setNextInVariableOrder, setNextInWriteOrder, setPreviousInVariableOrder, setPreviousInWriteOrder, setVariableTime, setWriteTime
-
Methods inherited from class com.github.benmanes.caffeine.cache.FS
containsValue, die, getKey, getKeyReference, getValue, getValueReference, isAlive, isDead, isRetired, newLookupKey, newReferenceKey, retire, setValue
-
Methods inherited from class com.github.benmanes.caffeine.cache.Node
getAccessTime, getNextInAccessOrder, getPolicyWeight, getPreviousInAccessOrder, getQueueType, getWeight, inMainProbation, inMainProtected, inWindow, makeMainProbation, makeMainProtected, makeWindow, setAccessTime, setNextInAccessOrder, setPolicyWeight, setPreviousInAccessOrder, setQueueType, 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
softValues, weakValues
-
-
-
-
Method Detail
-
casWriteTime
public final boolean casWriteTime(long expect, long update)
Description copied from class:Node
Atomically sets the write time to the given updated value if the current value equals the expected value and returns if the update was successful.- Overrides:
casWriteTime
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.
-
-