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:
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) inthash(package private) Kkey(package private) ReferenceEntry<K,V>next(package private) LocalCache.ValueReference<K,V>valueReference
-
Constructor Summary
Constructors Constructor Description StrongEntry(K key, int hash, ReferenceEntry<K,V> next)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetHash()Returns the entry's hash.KgetKey()Returns the key for this entry.ReferenceEntry<K,V>getNext()Returns the next entry in the chain.LocalCache.ValueReference<K,V>getValueReference()Returns the value reference from this entry.voidsetValueReference(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 ReferenceEntry<K,V> next
-
valueReference
volatile LocalCache.ValueReference<K,V> valueReference
-
-
Constructor Detail
-
StrongEntry
StrongEntry(K key, int hash, ReferenceEntry<K,V> next)
-
-
Method Detail
-
getKey
public K getKey()
Description copied from interface:ReferenceEntryReturns the key for this entry.- Specified by:
getKeyin interfaceReferenceEntry<K,V>- Overrides:
getKeyin classLocalCache.AbstractReferenceEntry<K,V>
-
getValueReference
public LocalCache.ValueReference<K,V> getValueReference()
Description copied from interface:ReferenceEntryReturns the value reference from this entry.- Specified by:
getValueReferencein interfaceReferenceEntry<K,V>- Overrides:
getValueReferencein classLocalCache.AbstractReferenceEntry<K,V>
-
setValueReference
public void setValueReference(LocalCache.ValueReference<K,V> valueReference)
Description copied from interface:ReferenceEntrySets the value reference for this entry.- Specified by:
setValueReferencein interfaceReferenceEntry<K,V>- Overrides:
setValueReferencein classLocalCache.AbstractReferenceEntry<K,V>
-
getHash
public int getHash()
Description copied from interface:ReferenceEntryReturns the entry's hash.- Specified by:
getHashin interfaceReferenceEntry<K,V>- Overrides:
getHashin classLocalCache.AbstractReferenceEntry<K,V>
-
getNext
public ReferenceEntry<K,V> getNext()
Description copied from interface:ReferenceEntryReturns the next entry in the chain.- Specified by:
getNextin interfaceReferenceEntry<K,V>- Overrides:
getNextin classLocalCache.AbstractReferenceEntry<K,V>
-
-