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

Comparing jsr166/src/jdk7/java/util/concurrent/ConcurrentHashMap.java (file contents):
Revision 1.27 by jsr166, Wed Jun 19 17:11:57 2013 UTC vs.
Revision 1.28 by jsr166, Mon Jul 1 19:19:31 2013 UTC

# Line 131 | Line 131 | public class ConcurrentHashMap<K,V> impl
131       * because they have negative hash fields and null key and value
132       * fields. (These special nodes are either uncommon or transient,
133       * so the impact of carrying around some unused fields is
134 <     * insignficant.)
134 >     * insignificant.)
135       *
136       * The table is lazily initialized to a power-of-two size upon the
137       * first insertion.  Each bin in the table normally contains a
# Line 294 | Line 294 | public class ConcurrentHashMap<K,V> impl
294       *
295       * TreeBins also require an additional locking mechanism.  While
296       * list traversal is always possible by readers even during
297 <     * updates, tree traversal is not, mainly beause of tree-rotations
297 >     * updates, tree traversal is not, mainly because of tree-rotations
298       * that may change the root node and/or its linkages.  TreeBins
299       * include a simple read-write lock mechanism parasitic on the
300       * main bin-synchronization strategy: Structural adjustments
# Line 401 | Line 401 | public class ConcurrentHashMap<K,V> impl
401       * Encodings for Node hash fields. See above for explanation.
402       */
403      static final int MOVED     = 0x8fffffff; // (-1) hash for forwarding nodes
404 <    static final int TREEBIN   = 0x80000000; // hash for heads of treea
404 >    static final int TREEBIN   = 0x80000000; // hash for roots of trees
405      static final int RESERVED  = 0x80000001; // hash for transient reservations
406      static final int HASH_BITS = 0x7fffffff; // usable bits of normal node hash
407  
# Line 421 | Line 421 | public class ConcurrentHashMap<K,V> impl
421       * Key-value entry.  This class is never exported out as a
422       * user-mutable Map.Entry (i.e., one supporting setValue; see
423       * MapEntry below), but can be used for read-only traversals used
424 <     * in bulk tasks.  Subclasses of Node with a negativehash field
424 >     * in bulk tasks.  Subclasses of Node with a negative hash field
425       * are special, and contain null keys and values (but are never
426       * exported).  Otherwise, keys and vals are never null.
427       */
# Line 2008 | Line 2008 | public class ConcurrentHashMap<K,V> impl
2008  
2009          /**
2010           * Returns matching node or null if none. Tries to search
2011 <         * using tree compareisons from root, but continues linear
2011 >         * using tree comparisons from root, but continues linear
2012           * search when lock not available.
2013           */
2014          final Node<K,V> find(int h, Object k) {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines