public static interface BoundedConcurrentHashMapV8.EvictionPolicy<K,V>
Modifier and Type | Method and Description |
---|---|
org.infinispan.util.concurrent.jdk8backported.BoundedConcurrentHashMapV8.Node<K,V> |
createNewEntry(K key,
int hash,
org.infinispan.util.concurrent.jdk8backported.BoundedConcurrentHashMapV8.Node<K,V> next,
V value,
org.infinispan.util.concurrent.jdk8backported.BoundedConcurrentHashMapV8.EvictionEntry<K,V> evictionEntry) |
org.infinispan.util.concurrent.jdk8backported.BoundedConcurrentHashMapV8.TreeNode<K,V> |
createNewEntry(K key,
int hash,
org.infinispan.util.concurrent.jdk8backported.BoundedConcurrentHashMapV8.TreeNode<K,V> next,
org.infinispan.util.concurrent.jdk8backported.BoundedConcurrentHashMapV8.TreeNode<K,V> parent,
V value,
org.infinispan.util.concurrent.jdk8backported.BoundedConcurrentHashMapV8.EvictionEntry<K,V> evictionEntry) |
Collection<org.infinispan.util.concurrent.jdk8backported.BoundedConcurrentHashMapV8.Node<K,V>> |
findIfEntriesNeedEvicting()
This should be invoked after an operation that would cause an element to be added
to the map to make sure that no elements need evicting.
|
void |
onEntryHitRead(org.infinispan.util.concurrent.jdk8backported.BoundedConcurrentHashMapV8.Node<K,V> e,
V value)
Invoked to notify EvictionPolicy implementation that an entry in Segment has been
accessed.
|
void |
onEntryHitWrite(org.infinispan.util.concurrent.jdk8backported.BoundedConcurrentHashMapV8.Node<K,V> e,
V value)
Invoked to notify EvictionPolicy implementation that an entry in Segment has been
accessed.
|
void |
onEntryMiss(org.infinispan.util.concurrent.jdk8backported.BoundedConcurrentHashMapV8.Node<K,V> e,
V value)
Invoked to notify EvictionPolicy implementation that there has been an attempt to access
an entry in Segment, however that entry was not present in Segment.
|
void |
onEntryRemove(org.infinispan.util.concurrent.jdk8backported.BoundedConcurrentHashMapV8.Node<K,V> e)
Invoked to notify EvictionPolicy implementation that an entry e has been removed from
Segment.
|
org.infinispan.util.concurrent.jdk8backported.BoundedConcurrentHashMapV8.Node<K,V> createNewEntry(K key, int hash, org.infinispan.util.concurrent.jdk8backported.BoundedConcurrentHashMapV8.Node<K,V> next, V value, org.infinispan.util.concurrent.jdk8backported.BoundedConcurrentHashMapV8.EvictionEntry<K,V> evictionEntry)
org.infinispan.util.concurrent.jdk8backported.BoundedConcurrentHashMapV8.TreeNode<K,V> createNewEntry(K key, int hash, org.infinispan.util.concurrent.jdk8backported.BoundedConcurrentHashMapV8.TreeNode<K,V> next, org.infinispan.util.concurrent.jdk8backported.BoundedConcurrentHashMapV8.TreeNode<K,V> parent, V value, org.infinispan.util.concurrent.jdk8backported.BoundedConcurrentHashMapV8.EvictionEntry<K,V> evictionEntry)
void onEntryMiss(org.infinispan.util.concurrent.jdk8backported.BoundedConcurrentHashMapV8.Node<K,V> e, V value)
Note that this method is always invoked holding a lock on the table and only is raised when a write operation occurs where there wasn't a previous value
e
- accessed entry in Segmentvoid onEntryHitRead(org.infinispan.util.concurrent.jdk8backported.BoundedConcurrentHashMapV8.Node<K,V> e, V value)
Note that this method is invoked without the lock protecting the entry and is raised when there was found to be a value but it could be changed since we don't hold the lock
e
- accessed entry in Segmentvoid onEntryHitWrite(org.infinispan.util.concurrent.jdk8backported.BoundedConcurrentHashMapV8.Node<K,V> e, V value)
Note that this method is invoked with the lock protecting the entry and is raised when there is a previous value
e
- accessed entry in Segmentvoid onEntryRemove(org.infinispan.util.concurrent.jdk8backported.BoundedConcurrentHashMapV8.Node<K,V> e)
The lock will for sure be held when this invoked
e
- removed entry in SegmentCollection<org.infinispan.util.concurrent.jdk8backported.BoundedConcurrentHashMapV8.Node<K,V>> findIfEntriesNeedEvicting()
Note this is also invoked after a read hit.
This method is never invoked while holding a lock on any segment
Copyright © 2017 JBoss, a division of Red Hat. All Rights Reserved.