ehcache

net.sf.ehcache.store.chm
Class SelectableConcurrentHashMap

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by net.sf.ehcache.store.chm.ConcurrentHashMap<java.lang.Object,Element>
          extended by net.sf.ehcache.store.chm.SelectableConcurrentHashMap
All Implemented Interfaces:
java.io.Serializable, java.util.concurrent.ConcurrentMap<java.lang.Object,Element>, java.util.Map<java.lang.Object,Element>

public class SelectableConcurrentHashMap
extends ConcurrentHashMap<java.lang.Object,Element>

SelectableConcurrentHashMap subclasses a repackaged version of ConcurrentHashMap ito allow efficient random sampling of the map values.

The random sampling technique involves randomly selecting a map Segment, and then selecting a number of random entry chains from that segment.

Author:
Chris Dennis
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.util.AbstractMap
java.util.AbstractMap.SimpleImmutableEntry<K,V>
 
Nested classes/interfaces inherited from interface java.util.Map
java.util.Map.Entry<K,V>
 
Constructor Summary
SelectableConcurrentHashMap(int initialCapacity, float loadFactor, int concurrency)
           
 
Method Summary
 Element[] getRandomValues(int size)
           
 
Methods inherited from class net.sf.ehcache.store.chm.ConcurrentHashMap
clear, contains, containsKey, containsValue, elements, entrySet, get, isEmpty, keys, keySet, put, putAll, putIfAbsent, remove, remove, replace, replace, size, values
 
Methods inherited from class java.util.AbstractMap
clone, equals, hashCode, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode
 

Constructor Detail

SelectableConcurrentHashMap

public SelectableConcurrentHashMap(int initialCapacity,
                                   float loadFactor,
                                   int concurrency)
Method Detail

getRandomValues

public Element[] getRandomValues(int size)

ehcache

true