Package com.google.common.cache
Class LocalCache.WeakAccessWriteEntry<K,V>
java.lang.Object
java.lang.ref.Reference<T>
java.lang.ref.WeakReference<K>
com.google.common.cache.LocalCache.WeakEntry<K,V>
com.google.common.cache.LocalCache.WeakAccessWriteEntry<K,V>
- All Implemented Interfaces:
ReferenceEntry<K,V>
- Enclosing class:
- LocalCache<K,
V>
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) long(package private) ReferenceEntry<K,V> (package private) ReferenceEntry<K,V> (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
ConstructorsConstructorDescriptionWeakAccessWriteEntry(ReferenceQueue<K> queue, K key, int hash, ReferenceEntry<K, V> next) -
Method Summary
Modifier and TypeMethodDescriptionlongReturns the time that this entry was last accessed, in ns.Returns the next entry in the access queue.Returns the next entry in the write queue.Returns the previous entry in the access queue.Returns the previous entry in the write queue.longvoidsetAccessTime(long time) Sets the entry access time in ns.voidsetNextInAccessQueue(ReferenceEntry<K, V> next) Sets the next entry in the access queue.voidsetNextInWriteQueue(ReferenceEntry<K, V> next) Sets the next entry in the write queue.voidsetPreviousInAccessQueue(ReferenceEntry<K, V> previous) Sets the previous entry in the access 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
getHash, getKey, getNext, getValueReference, setValueReferenceMethods inherited from class java.lang.ref.Reference
clear, clone, enqueue, get, isEnqueued, reachabilityFence, refersTo
-
Field Details
-
accessTime
volatile long accessTime -
nextAccess
ReferenceEntry<K,V> nextAccess -
previousAccess
ReferenceEntry<K,V> previousAccess -
writeTime
volatile long writeTime -
nextWrite
ReferenceEntry<K,V> nextWrite -
previousWrite
ReferenceEntry<K,V> previousWrite
-
-
Constructor Details
-
WeakAccessWriteEntry
WeakAccessWriteEntry(ReferenceQueue<K> queue, K key, int hash, ReferenceEntry<K, V> next)
-
-
Method Details
-
getAccessTime
public long getAccessTime()Description copied from interface:ReferenceEntryReturns the time that this entry was last accessed, in ns.- Specified by:
getAccessTimein interfaceReferenceEntry<K,V> - Overrides:
getAccessTimein classLocalCache.WeakEntry<K,V>
-
setAccessTime
public void setAccessTime(long time) Description copied from interface:ReferenceEntrySets the entry access time in ns.- Specified by:
setAccessTimein interfaceReferenceEntry<K,V> - Overrides:
setAccessTimein classLocalCache.WeakEntry<K,V>
-
getNextInAccessQueue
Description copied from interface:ReferenceEntryReturns the next entry in the access queue.- Specified by:
getNextInAccessQueuein interfaceReferenceEntry<K,V> - Overrides:
getNextInAccessQueuein classLocalCache.WeakEntry<K,V>
-
setNextInAccessQueue
Description copied from interface:ReferenceEntrySets the next entry in the access queue.- Specified by:
setNextInAccessQueuein interfaceReferenceEntry<K,V> - Overrides:
setNextInAccessQueuein classLocalCache.WeakEntry<K,V>
-
getPreviousInAccessQueue
Description copied from interface:ReferenceEntryReturns the previous entry in the access queue.- Specified by:
getPreviousInAccessQueuein interfaceReferenceEntry<K,V> - Overrides:
getPreviousInAccessQueuein classLocalCache.WeakEntry<K,V>
-
setPreviousInAccessQueue
Description copied from interface:ReferenceEntrySets the previous entry in the access queue.- Specified by:
setPreviousInAccessQueuein interfaceReferenceEntry<K,V> - Overrides:
setPreviousInAccessQueuein classLocalCache.WeakEntry<K,V>
-
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>
-