Package org.apache.solr.util
Interface DynamicMap
- 
- All Known Implementing Classes:
- IntFloatDynamicMap,- IntIntDynamicMap,- IntLongDynamicMap
 
 public interface DynamicMapAn efficient map for storing keys as integer in range from 0..n with n can be estimated up-front. By automatically switching from a hashMap (which is memory efficient) to an array (which is faster) on increasing number of keys. So it SHOULD not be used for other cases where key can be any arbitrary integer.
- 
- 
Method SummaryAll Methods Instance Methods Default Methods Modifier and Type Method Description default intmapExpectedElements(int expectedKeyMax)Compute expected elements for hppc maps, so resizing won't happen if we store less elements thanthresholddefault intthreshold(int expectedKeyMax)Compute threshold for switching from hashMap based to arraydefault booleanuseArrayBased(int expectedKeyMax)
 
- 
- 
- 
Method Detail- 
useArrayBaseddefault boolean useArrayBased(int expectedKeyMax) 
 - 
thresholddefault int threshold(int expectedKeyMax) Compute threshold for switching from hashMap based to array
 - 
mapExpectedElementsdefault int mapExpectedElements(int expectedKeyMax) Compute expected elements for hppc maps, so resizing won't happen if we store less elements thanthreshold
 
- 
 
-