Class FDAWR<K,V>
java.lang.Object
com.github.benmanes.caffeine.cache.Node<K,V>
com.github.benmanes.caffeine.cache.FD<K,V>
com.github.benmanes.caffeine.cache.FDA<K,V>
com.github.benmanes.caffeine.cache.FDAW<K,V>
com.github.benmanes.caffeine.cache.FDAWR<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:
- RefreshWrite
- WeakKeys (inherited)
- SoftValues (inherited)
- ExpireAccess (inherited)
- ExpireWrite (inherited)
-
Field Summary
Fields inherited from class FDAW
nextInWriteOrder, previousInWriteOrder, WRITE_TIME_OFFSET, writeTimeFields inherited from class FDA
ACCESS_TIME_OFFSET, accessTime, nextInAccessOrder, previousInAccessOrderFields inherited from class FD
value, VALUE_OFFSETFields inherited from interface NodeFactory
DEAD_STRONG_KEY, DEAD_WEAK_KEY, RETIRED_STRONG_KEY, RETIRED_WEAK_KEY -
Constructor Summary
ConstructorsConstructorDescriptionFDAWR()FDAWR(Object keyReference, V value, ReferenceQueue<V> valueReferenceQueue, int weight, long now) FDAWR(K key, ReferenceQueue<K> keyReferenceQueue, V value, ReferenceQueue<V> valueReferenceQueue, int weight, long now) -
Method Summary
Modifier and TypeMethodDescriptionbooleancasVariableTime(long expect, long update) Atomically sets the variable time to the given updated value if the current value equals the expected value and returns if the update was successful.final booleancasWriteTime(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.longReturns the variable expiration time, in nanoseconds.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.voidsetNextInVariableOrder(Node<K, V> nextInWriteOrder) voidsetPreviousInVariableOrder(Node<K, V> previousInWriteOrder) voidsetVariableTime(long accessTime) Sets the variable expiration time in nanoseconds.Methods inherited from class FDAW
getNextInWriteOrder, getPreviousInWriteOrder, getWriteTime, setNextInWriteOrder, setPreviousInWriteOrder, setWriteTimeMethods inherited from class FDA
getAccessTime, getNextInAccessOrder, getPreviousInAccessOrder, setAccessTime, setNextInAccessOrder, setPreviousInAccessOrderMethods inherited from class FD
containsValue, die, getKey, getKeyReference, getValue, getValueReference, isAlive, isDead, isRetired, newLookupKey, newReferenceKey, retire, setValue, softValuesMethods inherited from class Node
getPolicyWeight, getQueueType, getWeight, inMainProbation, inMainProtected, inWindow, makeMainProbation, makeMainProtected, makeWindow, setPolicyWeight, setQueueType, setWeight, toStringMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface NodeFactory
weakValues
-
Constructor Details
-
FDAWR
FDAWR() -
FDAWR
FDAWR(K key, ReferenceQueue<K> keyReferenceQueue, V value, ReferenceQueue<V> valueReferenceQueue, int weight, long now) -
FDAWR
FDAWR(Object keyReference, V value, ReferenceQueue<V> valueReferenceQueue, int weight, long now)
-
-
Method Details
-
getPreviousInVariableOrder
-
setPreviousInVariableOrder
-
getNextInVariableOrder
-
setNextInVariableOrder
-
getVariableTime
public long getVariableTime()Description copied from class:NodeReturns the variable expiration time, in nanoseconds.- Overrides:
getVariableTimein classFDAW<K,V>
-
setVariableTime
public void setVariableTime(long accessTime) Description copied from class:NodeSets the variable expiration time in nanoseconds. This update may be set lazily and rely on the memory fence when the lock is released.- Overrides:
setVariableTimein classFDAW<K,V>
-
casVariableTime
public boolean casVariableTime(long expect, long update) Description copied from class:NodeAtomically sets the variable time to the given updated value if the current value equals the expected value and returns if the update was successful.- Overrides:
casVariableTimein classFDAW<K,V>
-
casWriteTime
public final boolean casWriteTime(long expect, long update) Description copied from class:NodeAtomically 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:
casWriteTimein 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:NodeFactoryReturns 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:NodeFactoryReturns a node optimized for the specified features.
-