Package com.google.common.cache
Class LocalCache.AbstractReferenceEntry<K,V>
- java.lang.Object
-
- com.google.common.cache.LocalCache.AbstractReferenceEntry<K,V>
-
- All Implemented Interfaces:
LocalCache.ReferenceEntry<K,V>
- Direct Known Subclasses:
LocalCache.StrongEntry
- Enclosing class:
- LocalCache<K,V>
abstract static class LocalCache.AbstractReferenceEntry<K,V> extends java.lang.Object implements LocalCache.ReferenceEntry<K,V>
-
-
Constructor Summary
Constructors Constructor Description AbstractReferenceEntry()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longgetAccessTime()Returns the time that this entry was last accessed, in ns.intgetHash()Returns the entry's hash.KgetKey()Returns the key for this entry.LocalCache.ReferenceEntry<K,V>getNext()Returns the next entry in the chain.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.LocalCache.ValueReference<K,V>getValueReference()Returns the value reference from this entry.longgetWriteTime()Returns the time that this entry was last written, in ns.voidsetAccessTime(long time)Sets the entry access time in ns.voidsetNextInAccessQueue(LocalCache.ReferenceEntry<K,V> next)Sets the next entry in the access queue.voidsetNextInWriteQueue(LocalCache.ReferenceEntry<K,V> next)Sets the next entry in the write queue.voidsetPreviousInAccessQueue(LocalCache.ReferenceEntry<K,V> previous)Sets the previous entry in the access queue.voidsetPreviousInWriteQueue(LocalCache.ReferenceEntry<K,V> previous)Sets the previous entry in the write queue.voidsetValueReference(LocalCache.ValueReference<K,V> valueReference)Sets the value reference for this entry.voidsetWriteTime(long time)Sets the entry write time in ns.
-
-
-
Method Detail
-
getValueReference
public LocalCache.ValueReference<K,V> getValueReference()
Description copied from interface:LocalCache.ReferenceEntryReturns the value reference from this entry.- Specified by:
getValueReferencein interfaceLocalCache.ReferenceEntry<K,V>
-
setValueReference
public void setValueReference(LocalCache.ValueReference<K,V> valueReference)
Description copied from interface:LocalCache.ReferenceEntrySets the value reference for this entry.- Specified by:
setValueReferencein interfaceLocalCache.ReferenceEntry<K,V>
-
getNext
public LocalCache.ReferenceEntry<K,V> getNext()
Description copied from interface:LocalCache.ReferenceEntryReturns the next entry in the chain.- Specified by:
getNextin interfaceLocalCache.ReferenceEntry<K,V>
-
getHash
public int getHash()
Description copied from interface:LocalCache.ReferenceEntryReturns the entry's hash.- Specified by:
getHashin interfaceLocalCache.ReferenceEntry<K,V>
-
getKey
public K getKey()
Description copied from interface:LocalCache.ReferenceEntryReturns the key for this entry.- Specified by:
getKeyin interfaceLocalCache.ReferenceEntry<K,V>
-
getAccessTime
public long getAccessTime()
Description copied from interface:LocalCache.ReferenceEntryReturns the time that this entry was last accessed, in ns.- Specified by:
getAccessTimein interfaceLocalCache.ReferenceEntry<K,V>
-
setAccessTime
public void setAccessTime(long time)
Description copied from interface:LocalCache.ReferenceEntrySets the entry access time in ns.- Specified by:
setAccessTimein interfaceLocalCache.ReferenceEntry<K,V>
-
getNextInAccessQueue
public LocalCache.ReferenceEntry<K,V> getNextInAccessQueue()
Description copied from interface:LocalCache.ReferenceEntryReturns the next entry in the access queue.- Specified by:
getNextInAccessQueuein interfaceLocalCache.ReferenceEntry<K,V>
-
setNextInAccessQueue
public void setNextInAccessQueue(LocalCache.ReferenceEntry<K,V> next)
Description copied from interface:LocalCache.ReferenceEntrySets the next entry in the access queue.- Specified by:
setNextInAccessQueuein interfaceLocalCache.ReferenceEntry<K,V>
-
getPreviousInAccessQueue
public LocalCache.ReferenceEntry<K,V> getPreviousInAccessQueue()
Description copied from interface:LocalCache.ReferenceEntryReturns the previous entry in the access queue.- Specified by:
getPreviousInAccessQueuein interfaceLocalCache.ReferenceEntry<K,V>
-
setPreviousInAccessQueue
public void setPreviousInAccessQueue(LocalCache.ReferenceEntry<K,V> previous)
Description copied from interface:LocalCache.ReferenceEntrySets the previous entry in the access queue.- Specified by:
setPreviousInAccessQueuein interfaceLocalCache.ReferenceEntry<K,V>
-
getWriteTime
public long getWriteTime()
Description copied from interface:LocalCache.ReferenceEntryReturns the time that this entry was last written, in ns.- Specified by:
getWriteTimein interfaceLocalCache.ReferenceEntry<K,V>
-
setWriteTime
public void setWriteTime(long time)
Description copied from interface:LocalCache.ReferenceEntrySets the entry write time in ns.- Specified by:
setWriteTimein interfaceLocalCache.ReferenceEntry<K,V>
-
getNextInWriteQueue
public LocalCache.ReferenceEntry<K,V> getNextInWriteQueue()
Description copied from interface:LocalCache.ReferenceEntryReturns the next entry in the write queue.- Specified by:
getNextInWriteQueuein interfaceLocalCache.ReferenceEntry<K,V>
-
setNextInWriteQueue
public void setNextInWriteQueue(LocalCache.ReferenceEntry<K,V> next)
Description copied from interface:LocalCache.ReferenceEntrySets the next entry in the write queue.- Specified by:
setNextInWriteQueuein interfaceLocalCache.ReferenceEntry<K,V>
-
getPreviousInWriteQueue
public LocalCache.ReferenceEntry<K,V> getPreviousInWriteQueue()
Description copied from interface:LocalCache.ReferenceEntryReturns the previous entry in the write queue.- Specified by:
getPreviousInWriteQueuein interfaceLocalCache.ReferenceEntry<K,V>
-
setPreviousInWriteQueue
public void setPreviousInWriteQueue(LocalCache.ReferenceEntry<K,V> previous)
Description copied from interface:LocalCache.ReferenceEntrySets the previous entry in the write queue.- Specified by:
setPreviousInWriteQueuein interfaceLocalCache.ReferenceEntry<K,V>
-
-