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.286 by jsr166, Wed Sep 30 21:05:33 2015 UTC vs.
Revision 1.287 by jsr166, Sun Oct 25 03:34:04 2015 UTC

# Line 567 | Line 567 | public class ConcurrentHashMap<K,V> exte
567      /** Number of CPUS, to place bounds on some sizings */
568      static final int NCPU = Runtime.getRuntime().availableProcessors();
569  
570 <    /** For serialization compatibility. */
570 >    /**
571 >     * Serialized pseudo-fields, provided only for jdk7 compatibility.
572 >     * @serialField segments Segment[]
573 >     *   The segments, each of which is a specialized hash table.
574 >     * @serialField segmentMask int
575 >     *   Mask value for indexing into segments. The upper bits of a
576 >     *   key's hash code are used to choose the segment.
577 >     * @serialField segmentShift int
578 >     *   Shift value for indexing within segments.
579 >     */
580      private static final ObjectStreamField[] serialPersistentFields = {
581          new ObjectStreamField("segments", Segment[].class),
582          new ObjectStreamField("segmentMask", Integer.TYPE),
# Line 1353 | Line 1362 | public class ConcurrentHashMap<K,V> exte
1362       * @param s the stream
1363       * @throws java.io.IOException if an I/O error occurs
1364       * @serialData
1365 <     * the key (Object) and value (Object)
1366 <     * for each key-value mapping, followed by a null pair.
1365 >     * the serialized fields, followed by the key (Object) and value
1366 >     * (Object) for each key-value mapping, followed by a null pair.
1367       * The key-value mappings are emitted in no particular order.
1368       */
1369      private void writeObject(java.io.ObjectOutputStream s)
# Line 1390 | Line 1399 | public class ConcurrentHashMap<K,V> exte
1399          }
1400          s.writeObject(null);
1401          s.writeObject(null);
1393        segments = null; // throw away
1402      }
1403  
1404      /**

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines