public static interface BoundedConcurrentHashMap.EvictionPolicy<K,V>
Modifier and Type | Field and Description |
---|---|
static int |
MAX_BATCH_SIZE
Max batch size
|
Modifier and Type | Method and Description |
---|---|
void |
clear()
Invoked to notify EvictionPolicy implementation that all Segment entries have been
cleared.
|
org.jboss.jca.adapters.jdbc.util.BoundedConcurrentHashMap.HashEntry<K,V> |
createNewEntry(K key,
int hash,
org.jboss.jca.adapters.jdbc.util.BoundedConcurrentHashMap.HashEntry<K,V> next,
V value)
Create new entry
|
java.util.Set<org.jboss.jca.adapters.jdbc.util.BoundedConcurrentHashMap.HashEntry<K,V>> |
execute()
Invokes eviction policy algorithm and returns set of evicted entries.
|
boolean |
onEntryHit(org.jboss.jca.adapters.jdbc.util.BoundedConcurrentHashMap.HashEntry<K,V> e)
Invoked to notify EvictionPolicy implementation that an entry in Segment has been
accessed.
|
java.util.Set<org.jboss.jca.adapters.jdbc.util.BoundedConcurrentHashMap.HashEntry<K,V>> |
onEntryMiss(org.jboss.jca.adapters.jdbc.util.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.
|
void |
onEntryRemove(org.jboss.jca.adapters.jdbc.util.BoundedConcurrentHashMap.HashEntry<K,V> e)
Invoked to notify EvictionPolicy implementation that an entry e has been removed from
Segment.
|
BoundedConcurrentHashMap.Eviction |
strategy()
Returns type of eviction algorithm (strategy).
|
boolean |
thresholdExpired()
Returns true if batching threshold has expired, false otherwise.
|
static final int MAX_BATCH_SIZE
org.jboss.jca.adapters.jdbc.util.BoundedConcurrentHashMap.HashEntry<K,V> createNewEntry(K key, int hash, org.jboss.jca.adapters.jdbc.util.BoundedConcurrentHashMap.HashEntry<K,V> next, V value)
key
- The keyhash
- The hashnext
- The next entryvalue
- The valuejava.util.Set<org.jboss.jca.adapters.jdbc.util.BoundedConcurrentHashMap.HashEntry<K,V>> execute()
Set cannot be null but could possibly be an empty set.
java.util.Set<org.jboss.jca.adapters.jdbc.util.BoundedConcurrentHashMap.HashEntry<K,V>> onEntryMiss(org.jboss.jca.adapters.jdbc.util.BoundedConcurrentHashMap.HashEntry<K,V> e)
e
- accessed entry in Segmentboolean onEntryHit(org.jboss.jca.adapters.jdbc.util.BoundedConcurrentHashMap.HashEntry<K,V> e)
Note that this method is potentially invoked without holding a lock on Segment.
e
- accessed entry in Segmentvoid onEntryRemove(org.jboss.jca.adapters.jdbc.util.BoundedConcurrentHashMap.HashEntry<K,V> e)
e
- removed entry in Segmentvoid clear()
BoundedConcurrentHashMap.Eviction strategy()
boolean thresholdExpired()
Note that this method is potentially invoked without holding a lock on Segment.
Copyright ? 2010 Red Hat Middleware LLC (http://www.jboss.com/)