--- jsr166/src/jsr166e/ConcurrentHashMapV8.java 2012/11/23 17:50:51 1.79 +++ jsr166/src/jsr166e/ConcurrentHashMapV8.java 2013/02/11 20:52:00 1.98 @@ -21,33 +21,9 @@ import java.util.Enumeration; import java.util.ConcurrentModificationException; import java.util.NoSuchElementException; import java.util.concurrent.ConcurrentMap; -import java.util.concurrent.ThreadLocalRandom; -import java.util.concurrent.locks.LockSupport; import java.util.concurrent.locks.AbstractQueuedSynchronizer; +import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicReference; - -import java.io.Serializable; - -import java.util.Comparator; -import java.util.Arrays; -import java.util.Map; -import java.util.Set; -import java.util.Collection; -import java.util.AbstractMap; -import java.util.AbstractSet; -import java.util.AbstractCollection; -import java.util.Hashtable; -import java.util.HashMap; -import java.util.Iterator; -import java.util.Enumeration; -import java.util.ConcurrentModificationException; -import java.util.NoSuchElementException; -import java.util.concurrent.ConcurrentMap; -import java.util.concurrent.ThreadLocalRandom; -import java.util.concurrent.locks.LockSupport; -import java.util.concurrent.locks.AbstractQueuedSynchronizer; -import java.util.concurrent.atomic.AtomicReference; - import java.io.Serializable; /** @@ -124,23 +100,23 @@ import java.io.Serializable; *

Like {@link Hashtable} but unlike {@link HashMap}, this class * does not allow {@code null} to be used as a key or value. * - *

ConcurrentHashMapV8s support parallel operations using the {@link - * ForkJoinPool#commonPool}. (Tasks that may be used in other contexts - * are available in class {@link ForkJoinTasks}). These operations are - * designed to be safely, and often sensibly, applied even with maps - * that are being concurrently updated by other threads; for example, - * when computing a snapshot summary of the values in a shared - * registry. There are three kinds of operation, each with four - * forms, accepting functions with Keys, Values, Entries, and (Key, - * Value) arguments and/or return values. (The first three forms are - * also available via the {@link #keySet()}, {@link #values()} and - * {@link #entrySet()} views). Because the elements of a - * ConcurrentHashMapV8 are not ordered in any particular way, and may be - * processed in different orders in different parallel executions, the - * correctness of supplied functions should not depend on any - * ordering, or on any other objects or values that may transiently - * change while computation is in progress; and except for forEach - * actions, should ideally be side-effect-free. + *

ConcurrentHashMapV8s support sequential and parallel operations + * bulk operations. (Parallel forms use the {@link + * ForkJoinPool#commonPool()}). Tasks that may be used in other + * contexts are available in class {@link ForkJoinTasks}. These + * operations are designed to be safely, and often sensibly, applied + * even with maps that are being concurrently updated by other + * threads; for example, when computing a snapshot summary of the + * values in a shared registry. There are three kinds of operation, + * each with four forms, accepting functions with Keys, Values, + * Entries, and (Key, Value) arguments and/or return values. Because + * the elements of a ConcurrentHashMapV8 are not ordered in any + * particular way, and may be processed in different orders in + * different parallel executions, the correctness of supplied + * functions should not depend on any ordering, or on any other + * objects or values that may transiently change while computation is + * in progress; and except for forEach actions, should ideally be + * side-effect-free. * *