static class LocalCache.WeakEntry<K,V> extends java.lang.ref.WeakReference<K> implements LocalCache.ReferenceEntry<K,V>
Modifier and Type | Field and Description |
---|---|
(package private) int |
hash |
(package private) LocalCache.ReferenceEntry<K,V> |
next |
(package private) LocalCache.ValueReference<K,V> |
valueReference |
Constructor and Description |
---|
WeakEntry(java.lang.ref.ReferenceQueue<K> queue,
K key,
int hash,
LocalCache.ReferenceEntry<K,V> next) |
Modifier and Type | Method and 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.
|
final int hash
final LocalCache.ReferenceEntry<K,V> next
volatile LocalCache.ValueReference<K,V> valueReference
WeakEntry(java.lang.ref.ReferenceQueue<K> queue, K key, int hash, @Nullable LocalCache.ReferenceEntry<K,V> next)
public K getKey()
LocalCache.ReferenceEntry
getKey
in interface LocalCache.ReferenceEntry<K,V>
public long getAccessTime()
LocalCache.ReferenceEntry
getAccessTime
in interface LocalCache.ReferenceEntry<K,V>
public void setAccessTime(long time)
LocalCache.ReferenceEntry
setAccessTime
in interface LocalCache.ReferenceEntry<K,V>
public LocalCache.ReferenceEntry<K,V> getNextInAccessQueue()
LocalCache.ReferenceEntry
getNextInAccessQueue
in interface LocalCache.ReferenceEntry<K,V>
public void setNextInAccessQueue(LocalCache.ReferenceEntry<K,V> next)
LocalCache.ReferenceEntry
setNextInAccessQueue
in interface LocalCache.ReferenceEntry<K,V>
public LocalCache.ReferenceEntry<K,V> getPreviousInAccessQueue()
LocalCache.ReferenceEntry
getPreviousInAccessQueue
in interface LocalCache.ReferenceEntry<K,V>
public void setPreviousInAccessQueue(LocalCache.ReferenceEntry<K,V> previous)
LocalCache.ReferenceEntry
setPreviousInAccessQueue
in interface LocalCache.ReferenceEntry<K,V>
public long getWriteTime()
LocalCache.ReferenceEntry
getWriteTime
in interface LocalCache.ReferenceEntry<K,V>
public void setWriteTime(long time)
LocalCache.ReferenceEntry
setWriteTime
in interface LocalCache.ReferenceEntry<K,V>
public LocalCache.ReferenceEntry<K,V> getNextInWriteQueue()
LocalCache.ReferenceEntry
getNextInWriteQueue
in interface LocalCache.ReferenceEntry<K,V>
public void setNextInWriteQueue(LocalCache.ReferenceEntry<K,V> next)
LocalCache.ReferenceEntry
setNextInWriteQueue
in interface LocalCache.ReferenceEntry<K,V>
public LocalCache.ReferenceEntry<K,V> getPreviousInWriteQueue()
LocalCache.ReferenceEntry
getPreviousInWriteQueue
in interface LocalCache.ReferenceEntry<K,V>
public void setPreviousInWriteQueue(LocalCache.ReferenceEntry<K,V> previous)
LocalCache.ReferenceEntry
setPreviousInWriteQueue
in interface LocalCache.ReferenceEntry<K,V>
public LocalCache.ValueReference<K,V> getValueReference()
LocalCache.ReferenceEntry
getValueReference
in interface LocalCache.ReferenceEntry<K,V>
public void setValueReference(LocalCache.ValueReference<K,V> valueReference)
LocalCache.ReferenceEntry
setValueReference
in interface LocalCache.ReferenceEntry<K,V>
public int getHash()
LocalCache.ReferenceEntry
getHash
in interface LocalCache.ReferenceEntry<K,V>
public LocalCache.ReferenceEntry<K,V> getNext()
LocalCache.ReferenceEntry
getNext
in interface LocalCache.ReferenceEntry<K,V>