236 * AbstractMap.SimpleEntry(k,v)}.
237 *
238 * <p>Bulk operations may complete abruptly, throwing an
239 * exception encountered in the application of a supplied
240 * function. Bear in mind when handling such exceptions that other
241 * concurrently executing functions could also have thrown
242 * exceptions, or would have done so if the first exception had
243 * not occurred.
244 *
245 * <p>Speedups for parallel compared to sequential forms are common
246 * but not guaranteed. Parallel operations involving brief functions
247 * on small maps may execute more slowly than sequential forms if the
248 * underlying work to parallelize the computation is more expensive
249 * than the computation itself. Similarly, parallelization may not
250 * lead to much actual parallelism if all processors are busy
251 * performing unrelated tasks.
252 *
253 * <p>All arguments to all task methods must be non-null.
254 *
255 * <p>This class is a member of the
256 * <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework">
257 * Java Collections Framework</a>.
258 *
259 * @since 1.5
260 * @author Doug Lea
261 * @param <K> the type of keys maintained by this map
262 * @param <V> the type of mapped values
263 */
264 public class ConcurrentHashMap<K,V> extends AbstractMap<K,V>
265 implements ConcurrentMap<K,V>, Serializable {
266 private static final long serialVersionUID = 7249069246763182397L;
267
268 /*
269 * Overview:
270 *
271 * The primary design goal of this hash table is to maintain
272 * concurrent readability (typically method get(), but also
273 * iterators and related methods) while minimizing update
274 * contention. Secondary goals are to keep space consumption about
275 * the same or better than java.util.HashMap, and to support high
276 * initial insertion rates on an empty table by many threads.
|
236 * AbstractMap.SimpleEntry(k,v)}.
237 *
238 * <p>Bulk operations may complete abruptly, throwing an
239 * exception encountered in the application of a supplied
240 * function. Bear in mind when handling such exceptions that other
241 * concurrently executing functions could also have thrown
242 * exceptions, or would have done so if the first exception had
243 * not occurred.
244 *
245 * <p>Speedups for parallel compared to sequential forms are common
246 * but not guaranteed. Parallel operations involving brief functions
247 * on small maps may execute more slowly than sequential forms if the
248 * underlying work to parallelize the computation is more expensive
249 * than the computation itself. Similarly, parallelization may not
250 * lead to much actual parallelism if all processors are busy
251 * performing unrelated tasks.
252 *
253 * <p>All arguments to all task methods must be non-null.
254 *
255 * <p>This class is a member of the
256 * <a href="{@docRoot}/java.base/java/util/package-summary.html#CollectionsFramework">
257 * Java Collections Framework</a>.
258 *
259 * @since 1.5
260 * @author Doug Lea
261 * @param <K> the type of keys maintained by this map
262 * @param <V> the type of mapped values
263 */
264 public class ConcurrentHashMap<K,V> extends AbstractMap<K,V>
265 implements ConcurrentMap<K,V>, Serializable {
266 private static final long serialVersionUID = 7249069246763182397L;
267
268 /*
269 * Overview:
270 *
271 * The primary design goal of this hash table is to maintain
272 * concurrent readability (typically method get(), but also
273 * iterators and related methods) while minimizing update
274 * contention. Secondary goals are to keep space consumption about
275 * the same or better than java.util.HashMap, and to support high
276 * initial insertion rates on an empty table by many threads.
|