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.58 by dl, Tue Mar 8 12:27:11 2005 UTC vs.
Revision 1.59 by jsr166, Tue Apr 26 01:54:09 2005 UTC

# Line 98 | Line 98 | public class ConcurrentHashMap<K, V> ext
98      /**
99       * The default concurrency level for this table, used when not
100       * otherwise specified in a constructor.
101 <     **/
101 >     */
102      static final int DEFAULT_CONCURRENCY_LEVEL = 16;
103  
104      /**
# Line 128 | Line 128 | public class ConcurrentHashMap<K, V> ext
128      /**
129       * Mask value for indexing into segments. The upper bits of a
130       * key's hash code are used to choose the segment.
131 <     **/
131 >     */
132      final int segmentMask;
133  
134      /**
135       * Shift value for indexing within segments.
136 <     **/
136 >     */
137      final int segmentShift;
138  
139      /**
# Line 203 | Line 203 | public class ConcurrentHashMap<K, V> ext
203       * Segments are specialized versions of hash tables.  This
204       * subclasses from ReentrantLock opportunistically, just to
205       * simplify some locking and avoid separate construction.
206 <     **/
206 >     */
207      static final class Segment<K,V> extends ReentrantLock implements Serializable {
208          /*
209           * Segments maintain a table of entry lists that are ALWAYS
# Line 246 | Line 246 | public class ConcurrentHashMap<K, V> ext
246  
247          /**
248           * The number of elements in this segment's region.
249 <         **/
249 >         */
250          transient volatile int count;
251  
252          /**
# Line 288 | Line 288 | public class ConcurrentHashMap<K, V> ext
288          /**
289           * Set table to new HashEntry array.
290           * Call only while holding lock or in constructor.
291 <         **/
291 >         */
292          void setTable(HashEntry[] newTable) {
293              threshold = (int)(newTable.length * loadFactor);
294              table = newTable;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines