ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/jsr166e/ConcurrentHashMapV8.java
(Generate patch)

Comparing jsr166/src/jsr166e/ConcurrentHashMapV8.java (file contents):
Revision 1.6 by jsr166, Tue Aug 30 13:30:35 2011 UTC vs.
Revision 1.7 by jsr166, Tue Aug 30 13:41:59 2011 UTC

# Line 54 | Line 54 | import java.io.Serializable;
54   * <p> Resizing this or any other kind of hash table is a relatively
55   * slow operation, so, when possible, it is a good idea to provide
56   * estimates of expected table sizes in constructors. Also, for
57 < * compatability with previous versions of this class, constructors
57 > * compatibility with previous versions of this class, constructors
58   * may optionally specify an expected {@code concurrencyLevel} as an
59   * additional hint for internal sizing.
60   *
# Line 192 | Line 192 | public class ConcurrentHashMapV8<K, V>
192       * in 8 puts check threshold (and after resizing, many fewer do
193       * so). But this approximation has high variance for small table
194       * sizes, so we check on any collision for sizes <= 64.  Further,
195 <     * to increase the probablity that a resize occurs soon enough, we
195 >     * to increase the probability that a resize occurs soon enough, we
196       * offset the threshold (see THRESHOLD_OFFSET) by the expected
197       * number of puts between checks. This is currently set to 8, in
198       * accord with the default load factor. In practice, this is
199       * rarely overridden, and in any case is close enough to other
200 <     * plausible values not to waste dynamic probablity computation
200 >     * plausible values not to waste dynamic probability computation
201       * for more precision.
202       */
203  
# Line 234 | Line 234 | public class ConcurrentHashMapV8<K, V>
234      static final int DEFAULT_CONCURRENCY_LEVEL = 16;
235  
236      /**
237 <     * The count value to offset thesholds to compensate for checking
237 >     * The count value to offset thresholds to compensate for checking
238       * for resizing only when inserting into bins with two or more
239       * elements. See above for explanation.
240       */
# Line 271 | Line 271 | public class ConcurrentHashMapV8<K, V>
271      transient Set<Map.Entry<K,V>> entrySet;
272      transient Collection<V> values;
273  
274 <    /** For serialization compatability. Null unless serialized; see below */
274 >    /** For serialization compatibility. Null unless serialized; see below */
275      Segment<K,V>[] segments;
276  
277      /**
# Line 309 | Line 309 | public class ConcurrentHashMapV8<K, V>
309      }
310  
311      /*
312 <     * Volatile access nethods are used for table elements as well as
312 >     * Volatile access methods are used for table elements as well as
313       * elements of in-progress next table while resizing.  Uses in
314       * access and update methods are null checked by callers, and
315       * implicitly bounds-checked, relying on the invariants that tab

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines