Package com.google.common.cache
Class LocalCache.StrongEntry<K,V>
- java.lang.Object
-
- com.google.common.cache.LocalCache.AbstractReferenceEntry<K,V>
-
- com.google.common.cache.LocalCache.StrongEntry<K,V>
-
- All Implemented Interfaces:
LocalCache.ReferenceEntry<K,V>
- Direct Known Subclasses:
LocalCache.StrongAccessEntry
,LocalCache.StrongAccessWriteEntry
,LocalCache.StrongWriteEntry
- Enclosing class:
- LocalCache<K,V>
static class LocalCache.StrongEntry<K,V> extends LocalCache.AbstractReferenceEntry<K,V>
Used for strongly-referenced keys.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) int
hash
(package private) K
key
(package private) LocalCache.ReferenceEntry<K,V>
next
(package private) LocalCache.ValueReference<K,V>
valueReference
-
Constructor Summary
Constructors Constructor Description StrongEntry(K key, int hash, LocalCache.ReferenceEntry<K,V> next)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getHash()
Returns the entry's hash.K
getKey()
Returns the key for this entry.LocalCache.ReferenceEntry<K,V>
getNext()
Returns the next entry in the chain.LocalCache.ValueReference<K,V>
getValueReference()
Returns the value reference from this entry.void
setValueReference(LocalCache.ValueReference<K,V> valueReference)
Sets the value reference for this entry.-
Methods inherited from class com.google.common.cache.LocalCache.AbstractReferenceEntry
getAccessTime, getNextInAccessQueue, getNextInWriteQueue, getPreviousInAccessQueue, getPreviousInWriteQueue, getWriteTime, setAccessTime, setNextInAccessQueue, setNextInWriteQueue, setPreviousInAccessQueue, setPreviousInWriteQueue, setWriteTime
-
-
-
-
Field Detail
-
key
final K key
-
hash
final int hash
-
next
final LocalCache.ReferenceEntry<K,V> next
-
valueReference
volatile LocalCache.ValueReference<K,V> valueReference
-
-
Constructor Detail
-
StrongEntry
StrongEntry(K key, int hash, @Nullable LocalCache.ReferenceEntry<K,V> next)
-
-
Method Detail
-
getKey
public K getKey()
Description copied from interface:LocalCache.ReferenceEntry
Returns the key for this entry.- Specified by:
getKey
in interfaceLocalCache.ReferenceEntry<K,V>
- Overrides:
getKey
in classLocalCache.AbstractReferenceEntry<K,V>
-
getValueReference
public LocalCache.ValueReference<K,V> getValueReference()
Description copied from interface:LocalCache.ReferenceEntry
Returns the value reference from this entry.- Specified by:
getValueReference
in interfaceLocalCache.ReferenceEntry<K,V>
- Overrides:
getValueReference
in classLocalCache.AbstractReferenceEntry<K,V>
-
setValueReference
public void setValueReference(LocalCache.ValueReference<K,V> valueReference)
Description copied from interface:LocalCache.ReferenceEntry
Sets the value reference for this entry.- Specified by:
setValueReference
in interfaceLocalCache.ReferenceEntry<K,V>
- Overrides:
setValueReference
in classLocalCache.AbstractReferenceEntry<K,V>
-
getHash
public int getHash()
Description copied from interface:LocalCache.ReferenceEntry
Returns the entry's hash.- Specified by:
getHash
in interfaceLocalCache.ReferenceEntry<K,V>
- Overrides:
getHash
in classLocalCache.AbstractReferenceEntry<K,V>
-
getNext
public LocalCache.ReferenceEntry<K,V> getNext()
Description copied from interface:LocalCache.ReferenceEntry
Returns the next entry in the chain.- Specified by:
getNext
in interfaceLocalCache.ReferenceEntry<K,V>
- Overrides:
getNext
in classLocalCache.AbstractReferenceEntry<K,V>
-
-