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:
LocalCache.ReferenceEntry<K,V>
- Enclosing class:
- LocalCache<K,V>
static final class LocalCache.WeakAccessWriteEntry<K,V> extends LocalCache.WeakEntry<K,V>
-
-
Field Summary
Fields Modifier and Type Field Description (package private) long
accessTime
(package private) LocalCache.ReferenceEntry<K,V>
nextAccess
(package private) LocalCache.ReferenceEntry<K,V>
nextWrite
(package private) LocalCache.ReferenceEntry<K,V>
previousAccess
(package private) LocalCache.ReferenceEntry<K,V>
previousWrite
(package private) long
writeTime
-
Fields inherited from class com.google.common.cache.LocalCache.WeakEntry
hash, next, valueReference
-
-
Constructor Summary
Constructors Constructor Description WeakAccessWriteEntry(java.lang.ref.ReferenceQueue<K> queue, K key, int hash, LocalCache.ReferenceEntry<K,V> next)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getAccessTime()
Returns the time that this entry was last accessed, in ns.LocalCache.ReferenceEntry<K,V>
getNextInAccessQueue()
Returns the next entry in the access queue.LocalCache.ReferenceEntry<K,V>
getNextInWriteQueue()
Returns the next entry in the write queue.LocalCache.ReferenceEntry<K,V>
getPreviousInAccessQueue()
Returns the previous entry in the access queue.LocalCache.ReferenceEntry<K,V>
getPreviousInWriteQueue()
Returns the previous entry in the write queue.long
getWriteTime()
Returns the time that this entry was last written, in ns.void
setAccessTime(long time)
Sets the entry access time in ns.void
setNextInAccessQueue(LocalCache.ReferenceEntry<K,V> next)
Sets the next entry in the access queue.void
setNextInWriteQueue(LocalCache.ReferenceEntry<K,V> next)
Sets the next entry in the write queue.void
setPreviousInAccessQueue(LocalCache.ReferenceEntry<K,V> previous)
Sets the previous entry in the access queue.void
setPreviousInWriteQueue(LocalCache.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
getHash, getKey, getNext, getValueReference, setValueReference
-
-
-
-
Field Detail
-
accessTime
volatile long accessTime
-
nextAccess
LocalCache.ReferenceEntry<K,V> nextAccess
-
previousAccess
LocalCache.ReferenceEntry<K,V> previousAccess
-
writeTime
volatile long writeTime
-
nextWrite
LocalCache.ReferenceEntry<K,V> nextWrite
-
previousWrite
LocalCache.ReferenceEntry<K,V> previousWrite
-
-
Constructor Detail
-
WeakAccessWriteEntry
WeakAccessWriteEntry(java.lang.ref.ReferenceQueue<K> queue, K key, int hash, @Nullable LocalCache.ReferenceEntry<K,V> next)
-
-
Method Detail
-
getAccessTime
public long getAccessTime()
Description copied from interface:LocalCache.ReferenceEntry
Returns the time that this entry was last accessed, in ns.- Specified by:
getAccessTime
in interfaceLocalCache.ReferenceEntry<K,V>
- Overrides:
getAccessTime
in classLocalCache.WeakEntry<K,V>
-
setAccessTime
public void setAccessTime(long time)
Description copied from interface:LocalCache.ReferenceEntry
Sets the entry access time in ns.- Specified by:
setAccessTime
in interfaceLocalCache.ReferenceEntry<K,V>
- Overrides:
setAccessTime
in classLocalCache.WeakEntry<K,V>
-
getNextInAccessQueue
public LocalCache.ReferenceEntry<K,V> getNextInAccessQueue()
Description copied from interface:LocalCache.ReferenceEntry
Returns the next entry in the access queue.- Specified by:
getNextInAccessQueue
in interfaceLocalCache.ReferenceEntry<K,V>
- Overrides:
getNextInAccessQueue
in classLocalCache.WeakEntry<K,V>
-
setNextInAccessQueue
public void setNextInAccessQueue(LocalCache.ReferenceEntry<K,V> next)
Description copied from interface:LocalCache.ReferenceEntry
Sets the next entry in the access queue.- Specified by:
setNextInAccessQueue
in interfaceLocalCache.ReferenceEntry<K,V>
- Overrides:
setNextInAccessQueue
in classLocalCache.WeakEntry<K,V>
-
getPreviousInAccessQueue
public LocalCache.ReferenceEntry<K,V> getPreviousInAccessQueue()
Description copied from interface:LocalCache.ReferenceEntry
Returns the previous entry in the access queue.- Specified by:
getPreviousInAccessQueue
in interfaceLocalCache.ReferenceEntry<K,V>
- Overrides:
getPreviousInAccessQueue
in classLocalCache.WeakEntry<K,V>
-
setPreviousInAccessQueue
public void setPreviousInAccessQueue(LocalCache.ReferenceEntry<K,V> previous)
Description copied from interface:LocalCache.ReferenceEntry
Sets the previous entry in the access queue.- Specified by:
setPreviousInAccessQueue
in interfaceLocalCache.ReferenceEntry<K,V>
- Overrides:
setPreviousInAccessQueue
in classLocalCache.WeakEntry<K,V>
-
getWriteTime
public long getWriteTime()
Description copied from interface:LocalCache.ReferenceEntry
Returns the time that this entry was last written, in ns.- Specified by:
getWriteTime
in interfaceLocalCache.ReferenceEntry<K,V>
- Overrides:
getWriteTime
in classLocalCache.WeakEntry<K,V>
-
setWriteTime
public void setWriteTime(long time)
Description copied from interface:LocalCache.ReferenceEntry
Sets the entry write time in ns.- Specified by:
setWriteTime
in interfaceLocalCache.ReferenceEntry<K,V>
- Overrides:
setWriteTime
in classLocalCache.WeakEntry<K,V>
-
getNextInWriteQueue
public LocalCache.ReferenceEntry<K,V> getNextInWriteQueue()
Description copied from interface:LocalCache.ReferenceEntry
Returns the next entry in the write queue.- Specified by:
getNextInWriteQueue
in interfaceLocalCache.ReferenceEntry<K,V>
- Overrides:
getNextInWriteQueue
in classLocalCache.WeakEntry<K,V>
-
setNextInWriteQueue
public void setNextInWriteQueue(LocalCache.ReferenceEntry<K,V> next)
Description copied from interface:LocalCache.ReferenceEntry
Sets the next entry in the write queue.- Specified by:
setNextInWriteQueue
in interfaceLocalCache.ReferenceEntry<K,V>
- Overrides:
setNextInWriteQueue
in classLocalCache.WeakEntry<K,V>
-
getPreviousInWriteQueue
public LocalCache.ReferenceEntry<K,V> getPreviousInWriteQueue()
Description copied from interface:LocalCache.ReferenceEntry
Returns the previous entry in the write queue.- Specified by:
getPreviousInWriteQueue
in interfaceLocalCache.ReferenceEntry<K,V>
- Overrides:
getPreviousInWriteQueue
in classLocalCache.WeakEntry<K,V>
-
setPreviousInWriteQueue
public void setPreviousInWriteQueue(LocalCache.ReferenceEntry<K,V> previous)
Description copied from interface:LocalCache.ReferenceEntry
Sets the previous entry in the write queue.- Specified by:
setPreviousInWriteQueue
in interfaceLocalCache.ReferenceEntry<K,V>
- Overrides:
setPreviousInWriteQueue
in classLocalCache.WeakEntry<K,V>
-
-