Package com.google.common.cache
Interface LocalCache.ReferenceEntry<K,V>
-
- All Known Implementing Classes:
LocalCache.AbstractReferenceEntry
,LocalCache.NullEntry
,LocalCache.StrongAccessEntry
,LocalCache.StrongAccessWriteEntry
,LocalCache.StrongEntry
,LocalCache.StrongWriteEntry
,LocalCache.WeakAccessEntry
,LocalCache.WeakAccessWriteEntry
,LocalCache.WeakEntry
,LocalCache.WeakWriteEntry
- Enclosing class:
- LocalCache<K,V>
static interface LocalCache.ReferenceEntry<K,V>
An entry in a reference map. Entries in the map can be in the following states: Valid: - Live: valid key/value are set - Loading: loading is pending Invalid: - Expired: time expired (key/value may still be set) - Collected: key/value was partially collected, but not yet cleaned up - Unset: marked as unset, awaiting cleanup or reuse
-
-
Method Summary
All Methods Instance Methods Abstract 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.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.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
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
LocalCache.ValueReference<K,V> getValueReference()
Returns the value reference from this entry.
-
setValueReference
void setValueReference(LocalCache.ValueReference<K,V> valueReference)
Sets the value reference for this entry.
-
getNext
@Nullable LocalCache.ReferenceEntry<K,V> getNext()
Returns the next entry in the chain.
-
getHash
int getHash()
Returns the entry's hash.
-
getKey
@Nullable K getKey()
Returns the key for this entry.
-
getAccessTime
long getAccessTime()
Returns the time that this entry was last accessed, in ns.
-
setAccessTime
void setAccessTime(long time)
Sets the entry access time in ns.
-
getNextInAccessQueue
LocalCache.ReferenceEntry<K,V> getNextInAccessQueue()
Returns the next entry in the access queue.
-
setNextInAccessQueue
void setNextInAccessQueue(LocalCache.ReferenceEntry<K,V> next)
Sets the next entry in the access queue.
-
getPreviousInAccessQueue
LocalCache.ReferenceEntry<K,V> getPreviousInAccessQueue()
Returns the previous entry in the access queue.
-
setPreviousInAccessQueue
void setPreviousInAccessQueue(LocalCache.ReferenceEntry<K,V> previous)
Sets the previous entry in the access queue.
-
getWriteTime
long getWriteTime()
Returns the time that this entry was last written, in ns.
-
setWriteTime
void setWriteTime(long time)
Sets the entry write time in ns.
-
getNextInWriteQueue
LocalCache.ReferenceEntry<K,V> getNextInWriteQueue()
Returns the next entry in the write queue.
-
setNextInWriteQueue
void setNextInWriteQueue(LocalCache.ReferenceEntry<K,V> next)
Sets the next entry in the write queue.
-
getPreviousInWriteQueue
LocalCache.ReferenceEntry<K,V> getPreviousInWriteQueue()
Returns the previous entry in the write queue.
-
setPreviousInWriteQueue
void setPreviousInWriteQueue(LocalCache.ReferenceEntry<K,V> previous)
Sets the previous entry in the write queue.
-
-