private static final class BoundedConcurrentHashMap.LIRSHashEntry<K,V> extends BoundedConcurrentHashMap.HashEntry<K,V>
| Modifier and Type | Field and Description |
|---|---|
private BoundedConcurrentHashMap.LIRSHashEntry<K,V> |
nextInQueue |
private BoundedConcurrentHashMap.LIRSHashEntry<K,V> |
nextInStack |
(package private) BoundedConcurrentHashMap.LIRS<K,V> |
owner |
private BoundedConcurrentHashMap.LIRSHashEntry<K,V> |
previousInQueue |
private BoundedConcurrentHashMap.LIRSHashEntry<K,V> |
previousInStack |
(package private) BoundedConcurrentHashMap.Recency |
state |
hash, key, next, value| Constructor and Description |
|---|
LIRSHashEntry(BoundedConcurrentHashMap.LIRS<K,V> owner,
K key,
int hash,
BoundedConcurrentHashMap.HashEntry<K,V> next,
V value) |
| Modifier and Type | Method and Description |
|---|---|
private void |
addToQueueBefore(BoundedConcurrentHashMap.LIRSHashEntry<K,V> existingEntry)
Inserts this entry before the specified existing entry in the queue.
|
private void |
addToStackBefore(BoundedConcurrentHashMap.LIRSHashEntry<K,V> existingEntry)
Inserts this entry before the specified existing entry in the stack.
|
private void |
cold()
Marks this entry as cold.
|
private void |
coldHit(Set<BoundedConcurrentHashMap.HashEntry<K,V>> evicted)
Records a cache hit on a cold block.
|
boolean |
equals(Object o) |
private void |
evict()
Evicts this entry, removing it from the queue and setting its status to
cold non-resident.
|
private void |
fullMiss(Set<BoundedConcurrentHashMap.HashEntry<K,V>> evicted)
Records a miss when the hot entry set is full.
|
int |
hashCode() |
void |
hit(Set<BoundedConcurrentHashMap.HashEntry<K,V>> evicted)
Records a cache hit.
|
private void |
hot()
Marks this entry as hot.
|
private void |
hotHit(Set<BoundedConcurrentHashMap.HashEntry<K,V>> evicted)
Records a cache hit on a hot block.
|
boolean |
inQueue()
Returns true if this entry is in the queue, false otherwise.
|
boolean |
inStack()
Returns true if this entry is in the stack, false otherwise.
|
boolean |
isResident()
Returns true if this entry is resident in the cache, false otherwise.
|
private void |
migrateToQueue()
Moves this entry from the stack to the queue, marking it cold
(as hot entries must remain in the stack).
|
private void |
migrateToStack()
Moves this entry from the queue to the stack, marking it hot (as cold
resident entries must remain in the queue).
|
private Set<BoundedConcurrentHashMap.HashEntry<K,V>> |
miss()
Records a cache miss.
|
private void |
moveToQueueEnd()
Moves this entry to the end of the queue.
|
private void |
moveToStackBottom()
Moves this entry to the bottom of the stack.
|
private void |
moveToStackTop()
Moves this entry to the top of the stack.
|
private void |
nonResident()
Marks this entry as non-resident.
|
private V |
remove()
Removes this entry from the cache.
|
private void |
removeFromQueue()
Removes this entry from the queue.
|
private void |
removeFromStack()
Removes this entry from the stack.
|
private void |
tempRemoveFromQueue()
Temporarily removes this entry from the queue, fixing up neighbor links.
|
private void |
tempRemoveFromStack()
Temporarily removes this entry from the stack, fixing up neighbor links.
|
private void |
warmupMiss()
Records a miss when the hot entry set is not full.
|
newArrayprivate BoundedConcurrentHashMap.LIRSHashEntry<K,V> previousInStack
private BoundedConcurrentHashMap.LIRSHashEntry<K,V> nextInStack
private BoundedConcurrentHashMap.LIRSHashEntry<K,V> previousInQueue
private BoundedConcurrentHashMap.LIRSHashEntry<K,V> nextInQueue
volatile BoundedConcurrentHashMap.Recency state
BoundedConcurrentHashMap.LIRS<K,V> owner
LIRSHashEntry(BoundedConcurrentHashMap.LIRS<K,V> owner, K key, int hash, BoundedConcurrentHashMap.HashEntry<K,V> next, V value)
public int hashCode()
hashCode in class BoundedConcurrentHashMap.HashEntry<K,V>public boolean equals(Object o)
equals in class BoundedConcurrentHashMap.HashEntry<K,V>public boolean inStack()
public boolean inQueue()
public void hit(Set<BoundedConcurrentHashMap.HashEntry<K,V>> evicted)
private void hotHit(Set<BoundedConcurrentHashMap.HashEntry<K,V>> evicted)
private void coldHit(Set<BoundedConcurrentHashMap.HashEntry<K,V>> evicted)
private Set<BoundedConcurrentHashMap.HashEntry<K,V>> miss()
private void warmupMiss()
private void fullMiss(Set<BoundedConcurrentHashMap.HashEntry<K,V>> evicted)
private void hot()
private void cold()
private void nonResident()
public boolean isResident()
private void tempRemoveFromStack()
inStack() will
continue to return true. This should only be called if this node's links
will be subsequently changed.private void removeFromStack()
private void addToStackBefore(BoundedConcurrentHashMap.LIRSHashEntry<K,V> existingEntry)
private void moveToStackTop()
private void moveToStackBottom()
private void tempRemoveFromQueue()
private void removeFromQueue()
private void addToQueueBefore(BoundedConcurrentHashMap.LIRSHashEntry<K,V> existingEntry)
private void moveToQueueEnd()
private void migrateToQueue()
private void migrateToStack()
private void evict()
private V remove()
Copyright © 2020 JBoss by Red Hat. All rights reserved.