This map implementation actually maintains some of the first entries as hard references. Only oldest entries are retained by soft references, in order to avoid too aggressive garbage collection. The amount of entries to retain by hard reference is specified at {@linkplain #SoftValueHashMap(int) construction time}.
This map is thread-safe. It accepts the null key, but doesn't accepts null values. Usage of {@linkplain #values value}, {@linkplain #keySet key} or {@linkplain #entrySet entry}collections are supported except for direct usage of their iterators, which may throw {@link java.util.ConcurrentModificationException} randomly depending on the garbage collectoractivity. @param < K> The type of keys in the map. @param < V> The type of values in the map. @since 2.3 @source $URL$ @version $Id$ @author Simone Giannecchini @author Martin Desruisseaux
|
|