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.56 by dl, Mon Mar 7 16:41:56 2005 UTC vs.
Revision 1.57 by dl, Mon Mar 7 23:49:21 2005 UTC

# Line 39 | Line 39 | import java.io.ObjectOutputStream;
39   *
40   * <p> The allowed concurrency among update operations is guided by
41   * the optional <tt>concurrencyLevel</tt> constructor argument
42 < * (default {@value #DEFAULT_CONCURRENCY_LEVEL}), which is used as a hint for internal sizing.  The
42 > * (default <tt>16</tt>), which is used as a hint for internal sizing.  The
43   * table is internally partitioned to try to permit the indicated
44   * number of concurrent updates without contention. Because placement
45   * in hash tables is essentially random, the actual concurrency will
# Line 87 | Line 87 | public class ConcurrentHashMap<K, V> ext
87       * The default initial capacity for this table,
88       * used when not otherwise specified in a constructor.
89       */
90 <    public static final int DEFAULT_INITIAL_CAPACITY = 16;
90 >    static final int DEFAULT_INITIAL_CAPACITY = 16;
91  
92      /**
93       * The default load factor for this table, used when not
94       * otherwise specified in a constructor.
95       */
96 <    public static final float DEFAULT_LOAD_FACTOR = 0.75f;
96 >    static final float DEFAULT_LOAD_FACTOR = 0.75f;
97  
98      /**
99       * The default concurrency level for this table, used when not
100       * otherwise specified in a constructor.
101       **/
102 <    public static final int DEFAULT_CONCURRENCY_LEVEL = 16;
102 >    static final int DEFAULT_CONCURRENCY_LEVEL = 16;
103  
104      /**
105       * The maximum capacity, used if a higher value is implicitly
# Line 606 | Line 606 | public class ConcurrentHashMap<K, V> ext
606  
607      /**
608       * Creates a new, empty map with the specified initial capacity
609 <     * and load factor and with the default concurrencyLevel ({@value
610 <     * #DEFAULT_CONCURRENCY_LEVEL}).
609 >     * and load factor and with the default concurrencyLevel
610 >     * (<tt>16</tt>).
611       *
612       * @param initialCapacity The implementation performs internal
613       * sizing to accommodate this many elements.
# Line 621 | Line 621 | public class ConcurrentHashMap<K, V> ext
621  
622      /**
623       * Creates a new, empty map with the specified initial capacity,
624 <     * and with default load factor ({@value #DEFAULT_LOAD_FACTOR})
625 <     * and concurrencyLevel ({@value #DEFAULT_CONCURRENCY_LEVEL}).
624 >     * and with default load factor (<tt>0.75f</tt>)
625 >     * and concurrencyLevel (<tt>16</tt>).
626       *
627       * @param initialCapacity The implementation performs internal
628       * sizing to accommodate this many elements.
# Line 635 | Line 635 | public class ConcurrentHashMap<K, V> ext
635  
636      /**
637       * Creates a new, empty map with a default initial capacity
638 <     * ({@value #DEFAULT_INITIAL_CAPACITY}), load factor ({@value
639 <     * #DEFAULT_LOAD_FACTOR}), and concurrencyLevel ({@value
640 <     * #DEFAULT_CONCURRENCY_LEVEL}).
638 >     * (<tt>16</tt>), load factor
639 >     * (<tt>0.75f</tt>), and concurrencyLevel
640 >     * (<tt>16</tt>).
641       */
642      public ConcurrentHashMap() {
643          this(DEFAULT_INITIAL_CAPACITY, DEFAULT_LOAD_FACTOR, DEFAULT_CONCURRENCY_LEVEL);
# Line 646 | Line 646 | public class ConcurrentHashMap<K, V> ext
646      /**
647       * Creates a new map with the same mappings as the given map.  The
648       * map is created with a capacity of 1.5 times the number of
649 <     * mappings in the given map or {@value #DEFAULT_INITIAL_CAPACITY}
650 <     * (whichever is greater), and a default load factor ({@value
651 <     * #DEFAULT_LOAD_FACTOR}) and concurrencyLevel({@value
652 <     * #DEFAULT_CONCURRENCY_LEVEL}).
649 >     * mappings in the given map or <tt>16</tt>
650 >     * (whichever is greater), and a default load factor
651 >     * (<tt>0.75f</tt>) and concurrencyLevel
652 >     * (<tt>16</tt>).
653       * @param t the map
654       */
655      public ConcurrentHashMap(Map<? extends K, ? extends V> t) {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines