Top Fields Constructors Methods
com.github.benmanes.caffeine.cache

pack-priv final Class Interned<K, V>

Located in compilation unit of com.github.benmanes.caffeine.cache.Interner.

extends Node<K, V>
implements NodeFactory<K, V>
Class Inheritance
All Implemented Interfaces
com.github.benmanes.caffeine.cache.NodeFactory
Annotations
@SuppressWarnings:NullAway, unchecked

Field Summary

Modifier and TypeField and Description
pack-priv static final NodeFactory<Object, Object>
pack-priv volatile Reference<?>
Inherited from com.github.benmanes.caffeine.cache.Node:
PROBATIONPROTECTEDWINDOW

Constructor Summary

AccessConstructor and Description
pack-priv
pack-priv
Interned(Reference<K> keyReference)

Method Summary

Modifier and TypeMethod and Description
public boolean
containsValue(Object value)

Implements abstract com.github.benmanes.caffeine.cache.Node.containsValue.

Returns true if the given objects are considered equivalent.
public void
die()

Implements abstract com.github.benmanes.caffeine.cache.Node.die.

Sets the node to the dead state.
public K
getKey()

Implements abstract com.github.benmanes.caffeine.cache.Node.getKey.

Return the key or null if it has been reclaimed by the garbage collector.
public Object
getKeyReference()

Implements abstract com.github.benmanes.caffeine.cache.Node.getKeyReference.

Returns the reference that the cache is holding the entry by.
public V
getValue()

Implements abstract com.github.benmanes.caffeine.cache.Node.getValue.

Return the value or null if it has been reclaimed by the garbage collector.
public V
getValueReference()

Implements abstract com.github.benmanes.caffeine.cache.Node.getValueReference.

Returns the reference to the value.
public boolean
isAlive()

Implements abstract com.github.benmanes.caffeine.cache.Node.isAlive.

If the entry is available in the hash-table and page replacement policy.
public boolean
isDead()

Implements abstract com.github.benmanes.caffeine.cache.Node.isDead.

If the entry was removed from the hash-table and the page replacement policy.
public boolean
isRetired()

Implements abstract com.github.benmanes.caffeine.cache.Node.isRetired.

If the entry was removed from the hash-table and is awaiting removal from the page replacement policy.
public Object
newLookupKey(Object key)

Overrides default com.github.benmanes.caffeine.cache.NodeFactory.newLookupKey.

Returns a key suitable for looking up an entry in the cache.
public Node<K, V>
newNode(K key, ReferenceQueue<K> keyReferenceQueue, V value, ReferenceQueue<V> valueReferenceQueue, int weight, long now)

Implements com.github.benmanes.caffeine.cache.NodeFactory.newNode.

Returns a node optimized for the specified features.
public Node<K, V>
newNode(Object keyReference, V value, ReferenceQueue<V> valueReferenceQueue, int weight, long now)

Implements com.github.benmanes.caffeine.cache.NodeFactory.newNode.

Returns a node optimized for the specified features.
public Object
newReferenceKey(K key, ReferenceQueue<K> referenceQueue)

Overrides default com.github.benmanes.caffeine.cache.NodeFactory.newReferenceKey.

Returns a key suitable for inserting into the cache.
public void
retire()

Implements abstract com.github.benmanes.caffeine.cache.Node.retire.

Sets the node to the retired state.
public void
setValue(V value, ReferenceQueue<V> referenceQueue)

Inherited from com.github.benmanes.caffeine.cache.Node:
casVariableTimecasWriteTimegetAccessTimegetNextInAccessOrdergetNextInVariableOrdergetNextInWriteOrdergetPolicyWeightgetPreviousInAccessOrdergetPreviousInVariableOrdergetPreviousInWriteOrdergetQueueTypegetVariableTimegetWeightgetWriteTimeinMainProbationinMainProtectedinWindowmakeMainProbationmakeMainProtectedmakeWindowsetAccessTimesetNextInAccessOrdersetNextInVariableOrdersetNextInWriteOrdersetPolicyWeightsetPreviousInAccessOrdersetPreviousInVariableOrdersetPreviousInWriteOrdersetQueueTypesetValuesetVariableTimesetWeightsetWriteTimetoString

Field Detail

FACTORYback to summary
pack-priv static final NodeFactory<Object, Object> FACTORY

Hides com.github.benmanes.caffeine.cache.NodeFactory.FACTORY.

keyReferenceback to summary
pack-priv volatile Reference<?> keyReference

Constructor Detail

Internedback to summary
pack-priv Interned()
Internedback to summary
pack-priv Interned(Reference<K> keyReference)

Method Detail

containsValueback to summary
public boolean containsValue(Object value)

Implements abstract com.github.benmanes.caffeine.cache.Node.containsValue.

Doc from com.github.benmanes.caffeine.cache.Node.containsValue.

Returns true if the given objects are considered equivalent. A strongly held value is compared by equality and a weakly or softly held value is compared by identity.

Annotations
@Override
dieback to summary
public void die()

Implements abstract com.github.benmanes.caffeine.cache.Node.die.

Doc from com.github.benmanes.caffeine.cache.Node.die.

Sets the node to the dead state.

Annotations
@Override
getKeyback to summary
public K getKey()

Implements abstract com.github.benmanes.caffeine.cache.Node.getKey.

Doc from com.github.benmanes.caffeine.cache.Node.getKey.

Return the key or null if it has been reclaimed by the garbage collector.

Annotations
@Override
getKeyReferenceback to summary
public Object getKeyReference()

Implements abstract com.github.benmanes.caffeine.cache.Node.getKeyReference.

Doc from com.github.benmanes.caffeine.cache.Node.getKeyReference.

Returns the reference that the cache is holding the entry by. This is either the key if strongly held or a java.lang.ref.WeakReference to that key.

Annotations
@Override
getValueback to summary
public V getValue()

Implements abstract com.github.benmanes.caffeine.cache.Node.getValue.

Doc from com.github.benmanes.caffeine.cache.Node.getValue.

Return the value or null if it has been reclaimed by the garbage collector.

Annotations
@Override
getValueReferenceback to summary
public V getValueReference()

Implements abstract com.github.benmanes.caffeine.cache.Node.getValueReference.

Doc from com.github.benmanes.caffeine.cache.Node.getValueReference.

Returns the reference to the value. This is either the value if strongly held or a java.lang.ref.Reference to that value.

Annotations
@Override
isAliveback to summary
public boolean isAlive()

Implements abstract com.github.benmanes.caffeine.cache.Node.isAlive.

Doc from com.github.benmanes.caffeine.cache.Node.isAlive.

If the entry is available in the hash-table and page replacement policy.

Annotations
@Override
isDeadback to summary
public boolean isDead()

Implements abstract com.github.benmanes.caffeine.cache.Node.isDead.

Doc from com.github.benmanes.caffeine.cache.Node.isDead.

If the entry was removed from the hash-table and the page replacement policy.

Annotations
@Override
isRetiredback to summary
public boolean isRetired()

Implements abstract com.github.benmanes.caffeine.cache.Node.isRetired.

Doc from com.github.benmanes.caffeine.cache.Node.isRetired.

If the entry was removed from the hash-table and is awaiting removal from the page replacement policy.

Annotations
@Override
newLookupKeyback to summary
public Object newLookupKey(Object key)

Overrides default com.github.benmanes.caffeine.cache.NodeFactory.newLookupKey.

Doc from com.github.benmanes.caffeine.cache.NodeFactory.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 a LookupKeyReference holding the key argument is returned.

Annotations
@Override
newNodeback to summary
public Node<K, V> newNode(K key, ReferenceQueue<K> keyReferenceQueue, V value, ReferenceQueue<V> valueReferenceQueue, int weight, long now)

Implements com.github.benmanes.caffeine.cache.NodeFactory.newNode.

Doc from com.github.benmanes.caffeine.cache.NodeFactory.newNode.

Returns a node optimized for the specified features.

Annotations
@Override
newNodeback to summary
public Node<K, V> newNode(Object keyReference, V value, ReferenceQueue<V> valueReferenceQueue, int weight, long now)

Implements com.github.benmanes.caffeine.cache.NodeFactory.newNode.

Doc from com.github.benmanes.caffeine.cache.NodeFactory.newNode.

Returns a node optimized for the specified features.

Annotations
@Override
newReferenceKeyback to summary
public Object newReferenceKey(K key, ReferenceQueue<K> referenceQueue)

Overrides default com.github.benmanes.caffeine.cache.NodeFactory.newReferenceKey.

Doc from com.github.benmanes.caffeine.cache.NodeFactory.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 a java.lang.ref.Reference<K> holding the key argument is returned.

Annotations
@Override
retireback to summary
public void retire()

Implements abstract com.github.benmanes.caffeine.cache.Node.retire.

Doc from com.github.benmanes.caffeine.cache.Node.retire.

Sets the node to the retired state.

Annotations
@Override
setValueback to summary
public void setValue(V value, ReferenceQueue<V> referenceQueue)
Annotations
@Override