接口 BoundedConcurrentHashMap.EvictionPolicy<K,V>
-
- 封闭类:
- BoundedConcurrentHashMap<K,V>
public static interface BoundedConcurrentHashMap.EvictionPolicy<K,V>
-
-
字段概要
字段 修饰符和类型 字段 说明 static intMAX_BATCH_SIZE
-
方法概要
所有方法 实例方法 抽象方法 修饰符和类型 方法 说明 voidclear()Invoked to notify EvictionPolicy implementation that all Segment entries have been cleared.org.hibernate.internal.util.collections.BoundedConcurrentHashMap.HashEntry<K,V>createNewEntry(K key, int hash, org.hibernate.internal.util.collections.BoundedConcurrentHashMap.HashEntry<K,V> next, V value)Set<org.hibernate.internal.util.collections.BoundedConcurrentHashMap.HashEntry<K,V>>execute()Invokes eviction policy algorithm and returns set of evicted entries.booleanonEntryHit(org.hibernate.internal.util.collections.BoundedConcurrentHashMap.HashEntry<K,V> e)Invoked to notify EvictionPolicy implementation that an entry in Segment has been accessed.Set<org.hibernate.internal.util.collections.BoundedConcurrentHashMap.HashEntry<K,V>>onEntryMiss(org.hibernate.internal.util.collections.BoundedConcurrentHashMap.HashEntry<K,V> e)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.voidonEntryRemove(org.hibernate.internal.util.collections.BoundedConcurrentHashMap.HashEntry<K,V> e)Invoked to notify EvictionPolicy implementation that an entry e has been removed from Segment.BoundedConcurrentHashMap.Evictionstrategy()Returns type of eviction algorithm (strategy).booleanthresholdExpired()Returns true if batching threshold has expired, false otherwise.
-
-
-
字段详细资料
-
MAX_BATCH_SIZE
static final int MAX_BATCH_SIZE
- 另请参阅:
- 常量字段值
-
-
方法详细资料
-
createNewEntry
org.hibernate.internal.util.collections.BoundedConcurrentHashMap.HashEntry<K,V> createNewEntry(K key, int hash, org.hibernate.internal.util.collections.BoundedConcurrentHashMap.HashEntry<K,V> next, V value)
-
execute
Set<org.hibernate.internal.util.collections.BoundedConcurrentHashMap.HashEntry<K,V>> execute()
Invokes eviction policy algorithm and returns set of evicted entries. Set cannot be null but could possibly be an empty set.- 返回:
- set of evicted entries.
-
onEntryMiss
Set<org.hibernate.internal.util.collections.BoundedConcurrentHashMap.HashEntry<K,V>> onEntryMiss(org.hibernate.internal.util.collections.BoundedConcurrentHashMap.HashEntry<K,V> e)
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.- 参数:
e- accessed entry in Segment- 返回:
- non null set of evicted entries.
-
onEntryHit
boolean onEntryHit(org.hibernate.internal.util.collections.BoundedConcurrentHashMap.HashEntry<K,V> e)
Invoked to notify EvictionPolicy implementation that an entry in Segment has been accessed. Returns true if batching threshold has been reached, false otherwise. Note that this method is potentially invoked without holding a lock on Segment.- 参数:
e- accessed entry in Segment- 返回:
- true if batching threshold has been reached, false otherwise.
-
onEntryRemove
void onEntryRemove(org.hibernate.internal.util.collections.BoundedConcurrentHashMap.HashEntry<K,V> e)
Invoked to notify EvictionPolicy implementation that an entry e has been removed from Segment.- 参数:
e- removed entry in Segment
-
clear
void clear()
Invoked to notify EvictionPolicy implementation that all Segment entries have been cleared.
-
strategy
BoundedConcurrentHashMap.Eviction strategy()
Returns type of eviction algorithm (strategy).- 返回:
- type of eviction algorithm
-
thresholdExpired
boolean thresholdExpired()
Returns true if batching threshold has expired, false otherwise. Note that this method is potentially invoked without holding a lock on Segment.- 返回:
- true if batching threshold has expired, false otherwise.
-
-