Package com.google.common.cache
Class LocalCache.WeakWriteEntry<K,V>
java.lang.Object
java.lang.ref.Reference<K>
java.lang.ref.WeakReference<K>
com.google.common.cache.LocalCache.WeakEntry<K,V>
com.google.common.cache.LocalCache.WeakWriteEntry<K,V>
- All Implemented Interfaces:
ReferenceEntry<K,V>
- Enclosing class:
LocalCache<K,V>
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) ReferenceEntry<K, V> (package private) ReferenceEntry<K, V> (package private) longFields inherited from class com.google.common.cache.LocalCache.WeakEntry
hash, next, valueReference -
Constructor Summary
ConstructorsConstructorDescriptionWeakWriteEntry(ReferenceQueue<K> queue, K key, int hash, ReferenceEntry<K, V> next) -
Method Summary
Modifier and TypeMethodDescriptionReturns the next entry in the write queue.Returns the previous entry in the write queue.longvoidsetNextInWriteQueue(ReferenceEntry<K, V> next) Sets the next entry in the write queue.voidsetPreviousInWriteQueue(ReferenceEntry<K, V> previous) Sets the previous entry in the write queue.voidsetWriteTime(long time) Sets the entry write time in ns.Methods inherited from class com.google.common.cache.LocalCache.WeakEntry
getAccessTime, getHash, getKey, getNext, getNextInAccessQueue, getPreviousInAccessQueue, getValueReference, setAccessTime, setNextInAccessQueue, setPreviousInAccessQueue, setValueReferenceMethods inherited from class java.lang.ref.Reference
clear, clone, enqueue, get, isEnqueued, reachabilityFence, refersTo
-
Field Details
-
writeTime
volatile long writeTime -
nextWrite
ReferenceEntry<K,V> nextWrite -
previousWrite
ReferenceEntry<K,V> previousWrite
-
-
Constructor Details
-
WeakWriteEntry
WeakWriteEntry(ReferenceQueue<K> queue, K key, int hash, @CheckForNull ReferenceEntry<K, V> next)
-
-
Method Details
-
getWriteTime
public long getWriteTime()- Specified by:
getWriteTimein interfaceReferenceEntry<K,V> - Overrides:
getWriteTimein classLocalCache.WeakEntry<K,V>
-
setWriteTime
public void setWriteTime(long time) Description copied from interface:ReferenceEntrySets the entry write time in ns.- Specified by:
setWriteTimein interfaceReferenceEntry<K,V> - Overrides:
setWriteTimein classLocalCache.WeakEntry<K,V>
-
getNextInWriteQueue
Description copied from interface:ReferenceEntryReturns the next entry in the write queue.- Specified by:
getNextInWriteQueuein interfaceReferenceEntry<K,V> - Overrides:
getNextInWriteQueuein classLocalCache.WeakEntry<K,V>
-
setNextInWriteQueue
Description copied from interface:ReferenceEntrySets the next entry in the write queue.- Specified by:
setNextInWriteQueuein interfaceReferenceEntry<K,V> - Overrides:
setNextInWriteQueuein classLocalCache.WeakEntry<K,V>
-
getPreviousInWriteQueue
Description copied from interface:ReferenceEntryReturns the previous entry in the write queue.- Specified by:
getPreviousInWriteQueuein interfaceReferenceEntry<K,V> - Overrides:
getPreviousInWriteQueuein classLocalCache.WeakEntry<K,V>
-
setPreviousInWriteQueue
Description copied from interface:ReferenceEntrySets the previous entry in the write queue.- Specified by:
setPreviousInWriteQueuein interfaceReferenceEntry<K,V> - Overrides:
setPreviousInWriteQueuein classLocalCache.WeakEntry<K,V>
-