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ODE
A factory for cache nodes optimized for a particular configuration.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Object
static final References.WeakKeyReference
<Object> static final Object
static final References.WeakKeyReference
<Object> -
Method Summary
Modifier and TypeMethodDescriptionstatic <K,
V> NodeFactory <K, V> newFactory
(Caffeine<K, V> builder, boolean isAsync) Returns a factory optimized for the specified features.default Object
newLookupKey
(Object key) Returns a key suitable for looking up an entry in the cache.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.default Object
newReferenceKey
(K key, ReferenceQueue<K> referenceQueue) Returns a key suitable for inserting into the cache.default boolean
Returns whether this factory supports soft values.default boolean
Returns whether this factory supports weak values.
-
Field Details
-
RETIRED_STRONG_KEY
-
DEAD_STRONG_KEY
-
RETIRED_WEAK_KEY
-
DEAD_WEAK_KEY
-
-
Method Details
-
newNode
Node<K,V> newNode(K key, ReferenceQueue<K> keyReferenceQueue, V value, ReferenceQueue<V> valueReferenceQueue, int weight, long now) Returns a node optimized for the specified features. -
newNode
Node<K,V> newNode(Object keyReference, V value, ReferenceQueue<V> valueReferenceQueue, int weight, long now) Returns a node optimized for the specified features. -
newReferenceKey
Returns a key suitable for inserting into the cache. If the cache holds keys strongly then the key is returned. If the cache holds keys weakly then aReferences.WeakKeyReference<K>
holding the key argument is returned. -
newLookupKey
Returns a key suitable for looking up an entry in the cache. If the cache holds keys strongly then the key is returned. If the cache holds keys weakly then aReferences.LookupKeyReference
holding the key argument is returned. -
newFactory
Returns a factory optimized for the specified features. -
weakValues
default boolean weakValues()Returns whether this factory supports weak values. -
softValues
default boolean softValues()Returns whether this factory supports soft values.
-