Class PDAWR<K,V>
- java.lang.Object
-
- com.github.benmanes.caffeine.cache.Node<K,V>
-
- com.github.benmanes.caffeine.cache.PD<K,V>
-
- com.github.benmanes.caffeine.cache.PDA<K,V>
-
- com.github.benmanes.caffeine.cache.PDAW<K,V>
-
- com.github.benmanes.caffeine.cache.PDAWR<K,V>
-
- All Implemented Interfaces:
AccessOrderDeque.AccessOrder<Node<K,V>>
,NodeFactory<K,V>
,WriteOrderDeque.WriteOrder<Node<K,V>>
class PDAWR<K,V> extends PDAW<K,V>
WARNING: GENERATED CODE A cache entry that provides the following features:- RefreshWrite
- StrongKeys (inherited)
- SoftValues (inherited)
- ExpireAccess (inherited)
- ExpireWrite (inherited)
-
-
Field Summary
-
Fields inherited from class com.github.benmanes.caffeine.cache.PDAW
nextInWriteOrder, previousInWriteOrder, WRITE_TIME_OFFSET, writeTime
-
Fields inherited from class com.github.benmanes.caffeine.cache.PDA
ACCESS_TIME_OFFSET, accessTime, nextInAccessOrder, previousInAccessOrder
-
Fields inherited from class com.github.benmanes.caffeine.cache.PD
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 PDAWR()
PDAWR(java.lang.Object keyReference, V value, java.lang.ref.ReferenceQueue<V> valueReferenceQueue, int weight, long now)
PDAWR(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
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.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>
getNextInVariableOrder()
Node<K,V>
getPreviousInVariableOrder()
long
getVariableTime()
Returns the variable expiration time, in nanoseconds.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
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.PDAW
getNextInWriteOrder, getPreviousInWriteOrder, getWriteTime, setNextInWriteOrder, setPreviousInWriteOrder, setWriteTime
-
Methods inherited from class com.github.benmanes.caffeine.cache.PDA
getAccessTime, getNextInAccessOrder, getPreviousInAccessOrder, setAccessTime, setNextInAccessOrder, setPreviousInAccessOrder
-
Methods inherited from class com.github.benmanes.caffeine.cache.PD
containsValue, die, getKey, getKeyReference, getValue, getValueReference, isAlive, isDead, isRetired, 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
newLookupKey, newReferenceKey, weakValues
-
-
-
-
Method Detail
-
getPreviousInVariableOrder
public Node<K,V> getPreviousInVariableOrder()
- Overrides:
getPreviousInVariableOrder
in classPDAW<K,V>
-
setPreviousInVariableOrder
public void setPreviousInVariableOrder(Node<K,V> previousInWriteOrder)
- Overrides:
setPreviousInVariableOrder
in classPDAW<K,V>
-
getNextInVariableOrder
public Node<K,V> getNextInVariableOrder()
- Overrides:
getNextInVariableOrder
in classPDAW<K,V>
-
setNextInVariableOrder
public void setNextInVariableOrder(Node<K,V> nextInWriteOrder)
- Overrides:
setNextInVariableOrder
in classPDAW<K,V>
-
getVariableTime
public long getVariableTime()
Description copied from class:Node
Returns the variable expiration time, in nanoseconds.- Overrides:
getVariableTime
in classPDAW<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 classPDAW<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 classPDAW<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, 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.
-
-