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 com.github.benmanes.caffeine.cache.FDAW
nextInWriteOrder, previousInWriteOrder, WRITE_TIME_OFFSET, writeTime
Fields inherited from class com.github.benmanes.caffeine.cache.FDA
ACCESS_TIME_OFFSET, accessTime, nextInAccessOrder, previousInAccessOrder
Fields inherited from class com.github.benmanes.caffeine.cache.FD
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
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 TypeMethodDescriptionboolean
casVariableTime
(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 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.long
Returns 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.void
setNextInVariableOrder
(Node<K, V> nextInWriteOrder) void
setPreviousInVariableOrder
(Node<K, V> previousInWriteOrder) void
setVariableTime
(long accessTime) Sets the variable expiration time in nanoseconds.Methods inherited from class com.github.benmanes.caffeine.cache.FDAW
getNextInWriteOrder, getPreviousInWriteOrder, getWriteTime, setNextInWriteOrder, setPreviousInWriteOrder, setWriteTime
Methods inherited from class com.github.benmanes.caffeine.cache.FDA
getAccessTime, getNextInAccessOrder, getPreviousInAccessOrder, setAccessTime, setNextInAccessOrder, setPreviousInAccessOrder
Methods inherited from class com.github.benmanes.caffeine.cache.FD
containsValue, die, getKey, getKeyReference, getValue, getValueReference, isAlive, isDead, isRetired, newLookupKey, newReferenceKey, retire, setValue, softValues
Methods inherited from class com.github.benmanes.caffeine.cache.Node
getPolicyWeight, getQueueType, getWeight, inMainProbation, inMainProtected, inWindow, makeMainProbation, makeMainProtected, makeWindow, setPolicyWeight, 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
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
- Overrides:
getPreviousInVariableOrder
in classFDAW<K,
V>
-
setPreviousInVariableOrder
- Overrides:
setPreviousInVariableOrder
in classFDAW<K,
V>
-
getNextInVariableOrder
- Overrides:
getNextInVariableOrder
in classFDAW<K,
V>
-
setNextInVariableOrder
- Overrides:
setNextInVariableOrder
in classFDAW<K,
V>
-
getVariableTime
public long getVariableTime()Description copied from class:Node
Returns the variable expiration time, in nanoseconds.- Overrides:
getVariableTime
in classFDAW<K,
V>
-
setVariableTime
public void setVariableTime(long accessTime) Description copied from class:Node
Sets the variable expiration time in nanoseconds. This update may be set lazily and rely on the memory fence when the lock is released.- Overrides:
setVariableTime
in classFDAW<K,
V>
-
casVariableTime
public boolean casVariableTime(long expect, long update) Description copied from class:Node
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.- Overrides:
casVariableTime
in classFDAW<K,
V>
-
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, 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.
-