ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/main/java/util/concurrent/ConcurrentHashMap.java
(Generate patch)

Comparing jsr166/src/main/java/util/concurrent/ConcurrentHashMap.java (file contents):
Revision 1.144 by jsr166, Sun Nov 18 03:07:22 2012 UTC vs.
Revision 1.145 by jsr166, Sun Nov 18 18:03:10 2012 UTC

# Line 43 | Line 43 | import java.io.Serializable;
43   * interoperable with {@code Hashtable} in programs that rely on its
44   * thread safety but not on its synchronization details.
45   *
46 < * <p> Retrieval operations (including {@code get}) generally do not
46 > * <p>Retrieval operations (including {@code get}) generally do not
47   * block, so may overlap with update operations (including {@code put}
48   * and {@code remove}). Retrievals reflect the results of the most
49   * recently <em>completed</em> update operations holding upon their
# Line 64 | Line 64 | import java.io.Serializable;
64   * that may be adequate for monitoring or estimation purposes, but not
65   * for program control.
66   *
67 < * <p> The table is dynamically expanded when there are too many
67 > * <p>The table is dynamically expanded when there are too many
68   * collisions (i.e., keys that have distinct hash codes but fall into
69   * the same slot modulo the table size), with the expected average
70   * effect of maintaining roughly two bins per mapping (corresponding
# Line 85 | Line 85 | import java.io.Serializable;
85   * {@code hashCode()} is a sure way to slow down performance of any
86   * hash table.
87   *
88 < * <p> A {@link Set} projection of a ConcurrentHashMap may be created
88 > * <p>A {@link Set} projection of a ConcurrentHashMap may be created
89   * (using {@link #newKeySet()} or {@link #newKeySet(int)}), or viewed
90   * (using {@link #keySet(Object)} when only keys are of interest, and the
91   * mapped values are (perhaps transiently) not used or all take the
92   * same mapping value.
93   *
94 < * <p> A ConcurrentHashMap can be used as scalable frequency map (a
94 > * <p>A ConcurrentHashMap can be used as scalable frequency map (a
95   * form of histogram or multiset) by using {@link LongAdder} values
96   * and initializing via {@link #computeIfAbsent}. For example, to add
97   * a count to a {@code ConcurrentHashMap<String,LongAdder> freqs}, you
# Line 102 | Line 102 | import java.io.Serializable;
102   * <em>optional</em> methods of the {@link Map} and {@link Iterator}
103   * interfaces.
104   *
105 < * <p> Like {@link Hashtable} but unlike {@link HashMap}, this class
105 > * <p>Like {@link Hashtable} but unlike {@link HashMap}, this class
106   * does <em>not</em> allow {@code null} to be used as a key or value.
107   *
108   * <p>ConcurrentHashMaps support parallel operations using the {@link
# Line 187 | Line 187 | import java.io.Serializable;
187   * arguments can be supplied using {@code new
188   * AbstractMap.SimpleEntry(k,v)}.
189   *
190 < * <p> Bulk operations may complete abruptly, throwing an
190 > * <p>Bulk operations may complete abruptly, throwing an
191   * exception encountered in the application of a supplied
192   * function. Bear in mind when handling such exceptions that other
193   * concurrently executing functions could also have thrown
# Line 202 | Line 202 | import java.io.Serializable;
202   * Similarly, parallelization may not lead to much actual parallelism
203   * if all processors are busy performing unrelated tasks.
204   *
205 < * <p> All arguments to all task methods must be non-null.
205 > * <p>All arguments to all task methods must be non-null.
206   *
207   * <p><em>jsr166e note: During transition, this class
208   * uses nested functional interfaces with different names but the
# Line 228 | Line 228 | public class ConcurrentHashMap<K, V>
228       * portion of the elements, and so may be amenable to parallel
229       * execution.
230       *
231 <     * <p> This interface exports a subset of expected JDK8
231 >     * <p>This interface exports a subset of expected JDK8
232       * functionality.
233       *
234       * <p>Sample usage: Here is one (of the several) ways to compute
# Line 2719 | Line 2719 | public class ConcurrentHashMap<K, V>
2719       * Maps the specified key to the specified value in this table.
2720       * Neither the key nor the value can be null.
2721       *
2722 <     * <p> The value can be retrieved by calling the {@code get} method
2722 >     * <p>The value can be retrieved by calling the {@code get} method
2723       * with a key that is equal to the original key.
2724       *
2725       * @param key key with which the specified value is to be associated

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines