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) long
Fields 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.long
void
setNextInWriteQueue
(ReferenceEntry<K, V> next) Sets the next entry in the write queue.void
setPreviousInWriteQueue
(ReferenceEntry<K, V> previous) Sets the previous entry in the write queue.void
setWriteTime
(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, setValueReference
Methods 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:
getWriteTime
in interfaceReferenceEntry<K,
V> - Overrides:
getWriteTime
in classLocalCache.WeakEntry<K,
V>
-
setWriteTime
public void setWriteTime(long time) Description copied from interface:ReferenceEntry
Sets the entry write time in ns.- Specified by:
setWriteTime
in interfaceReferenceEntry<K,
V> - Overrides:
setWriteTime
in classLocalCache.WeakEntry<K,
V>
-
getNextInWriteQueue
Description copied from interface:ReferenceEntry
Returns the next entry in the write queue.- Specified by:
getNextInWriteQueue
in interfaceReferenceEntry<K,
V> - Overrides:
getNextInWriteQueue
in classLocalCache.WeakEntry<K,
V>
-
setNextInWriteQueue
Description copied from interface:ReferenceEntry
Sets the next entry in the write queue.- Specified by:
setNextInWriteQueue
in interfaceReferenceEntry<K,
V> - Overrides:
setNextInWriteQueue
in classLocalCache.WeakEntry<K,
V>
-
getPreviousInWriteQueue
Description copied from interface:ReferenceEntry
Returns the previous entry in the write queue.- Specified by:
getPreviousInWriteQueue
in interfaceReferenceEntry<K,
V> - Overrides:
getPreviousInWriteQueue
in classLocalCache.WeakEntry<K,
V>
-
setPreviousInWriteQueue
Description copied from interface:ReferenceEntry
Sets the previous entry in the write queue.- Specified by:
setPreviousInWriteQueue
in interfaceReferenceEntry<K,
V> - Overrides:
setPreviousInWriteQueue
in classLocalCache.WeakEntry<K,
V>
-