Package com.google.common.cache
Class LocalCache.AbstractReferenceEntry<K,V>
- java.lang.Object
-
- com.google.common.cache.LocalCache.AbstractReferenceEntry<K,V>
-
- All Implemented Interfaces:
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 ReferenceEntry<K,V>
-
-
Constructor Summary
Constructors Constructor Description AbstractReferenceEntry()
-
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.int
getHash()
Returns the entry's hash.K
getKey()
Returns the key for this entry.ReferenceEntry<K,V>
getNext()
Returns the next entry in the chain.ReferenceEntry<K,V>
getNextInAccessQueue()
Returns the next entry in the access queue.ReferenceEntry<K,V>
getNextInWriteQueue()
Returns the next entry in the write queue.ReferenceEntry<K,V>
getPreviousInAccessQueue()
Returns the previous entry in the access queue.ReferenceEntry<K,V>
getPreviousInWriteQueue()
Returns the previous entry in the write queue.LocalCache.ValueReference<K,V>
getValueReference()
Returns the value reference from this entry.long
getWriteTime()
void
setAccessTime(long time)
Sets the entry access time in ns.void
setNextInAccessQueue(ReferenceEntry<K,V> next)
Sets the next entry in the access queue.void
setNextInWriteQueue(ReferenceEntry<K,V> next)
Sets the next entry in the write queue.void
setPreviousInAccessQueue(ReferenceEntry<K,V> previous)
Sets the previous entry in the access queue.void
setPreviousInWriteQueue(ReferenceEntry<K,V> previous)
Sets the previous entry in the write queue.void
setValueReference(LocalCache.ValueReference<K,V> valueReference)
Sets the value reference for this entry.void
setWriteTime(long time)
Sets the entry write time in ns.
-
-
-
Method Detail
-
getValueReference
public LocalCache.ValueReference<K,V> getValueReference()
Description copied from interface:ReferenceEntry
Returns the value reference from this entry.- Specified by:
getValueReference
in interfaceReferenceEntry<K,V>
-
setValueReference
public void setValueReference(LocalCache.ValueReference<K,V> valueReference)
Description copied from interface:ReferenceEntry
Sets the value reference for this entry.- Specified by:
setValueReference
in interfaceReferenceEntry<K,V>
-
getNext
public ReferenceEntry<K,V> getNext()
Description copied from interface:ReferenceEntry
Returns the next entry in the chain.- Specified by:
getNext
in interfaceReferenceEntry<K,V>
-
getHash
public int getHash()
Description copied from interface:ReferenceEntry
Returns the entry's hash.- Specified by:
getHash
in interfaceReferenceEntry<K,V>
-
getKey
public K getKey()
Description copied from interface:ReferenceEntry
Returns the key for this entry.- Specified by:
getKey
in interfaceReferenceEntry<K,V>
-
getAccessTime
public long getAccessTime()
Description copied from interface:ReferenceEntry
Returns the time that this entry was last accessed, in ns.- Specified by:
getAccessTime
in interfaceReferenceEntry<K,V>
-
setAccessTime
public void setAccessTime(long time)
Description copied from interface:ReferenceEntry
Sets the entry access time in ns.- Specified by:
setAccessTime
in interfaceReferenceEntry<K,V>
-
getNextInAccessQueue
public ReferenceEntry<K,V> getNextInAccessQueue()
Description copied from interface:ReferenceEntry
Returns the next entry in the access queue.- Specified by:
getNextInAccessQueue
in interfaceReferenceEntry<K,V>
-
setNextInAccessQueue
public void setNextInAccessQueue(ReferenceEntry<K,V> next)
Description copied from interface:ReferenceEntry
Sets the next entry in the access queue.- Specified by:
setNextInAccessQueue
in interfaceReferenceEntry<K,V>
-
getPreviousInAccessQueue
public ReferenceEntry<K,V> getPreviousInAccessQueue()
Description copied from interface:ReferenceEntry
Returns the previous entry in the access queue.- Specified by:
getPreviousInAccessQueue
in interfaceReferenceEntry<K,V>
-
setPreviousInAccessQueue
public void setPreviousInAccessQueue(ReferenceEntry<K,V> previous)
Description copied from interface:ReferenceEntry
Sets the previous entry in the access queue.- Specified by:
setPreviousInAccessQueue
in interfaceReferenceEntry<K,V>
-
getWriteTime
public long getWriteTime()
- Specified by:
getWriteTime
in interfaceReferenceEntry<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>
-
getNextInWriteQueue
public ReferenceEntry<K,V> getNextInWriteQueue()
Description copied from interface:ReferenceEntry
Returns the next entry in the write queue.- Specified by:
getNextInWriteQueue
in interfaceReferenceEntry<K,V>
-
setNextInWriteQueue
public void setNextInWriteQueue(ReferenceEntry<K,V> next)
Description copied from interface:ReferenceEntry
Sets the next entry in the write queue.- Specified by:
setNextInWriteQueue
in interfaceReferenceEntry<K,V>
-
getPreviousInWriteQueue
public ReferenceEntry<K,V> getPreviousInWriteQueue()
Description copied from interface:ReferenceEntry
Returns the previous entry in the write queue.- Specified by:
getPreviousInWriteQueue
in interfaceReferenceEntry<K,V>
-
setPreviousInWriteQueue
public void setPreviousInWriteQueue(ReferenceEntry<K,V> previous)
Description copied from interface:ReferenceEntry
Sets the previous entry in the write queue.- Specified by:
setPreviousInWriteQueue
in interfaceReferenceEntry<K,V>
-
-