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.46 by dl, Thu Jul 5 18:05:28 2012 UTC vs.
Revision 1.50 by jsr166, Sat Jul 7 13:01:53 2012 UTC

# Line 2187 | Line 2187 | public class ConcurrentHashMapV8<K, V>
2187              baseLimit = baseSize = (tab == null) ? 0 : tab.length;
2188          }
2189  
2190 <        /** Creates iterator for clone() and split() methods */
2190 >        /** Creates iterator for clone() and split() methods. */
2191          InternalIterator(InternalIterator<K,V> it, boolean split) {
2192              this.map = it.map;
2193              this.tab = it.tab;
# Line 2199 | Line 2199 | public class ConcurrentHashMapV8<K, V>
2199          }
2200  
2201          /**
2202 <         * Advances next; returns nextVal or null if terminated
2202 >         * Advances next; returns nextVal or null if terminated.
2203           * See above for explanation.
2204           */
2205          final Object advance() {
# Line 2249 | Line 2249 | public class ConcurrentHashMapV8<K, V>
2249      /* ---------------- Public operations -------------- */
2250  
2251      /**
2252 <     * Creates a new, empty map with the default initial table size (16),
2252 >     * Creates a new, empty map with the default initial table size (16).
2253       */
2254      public ConcurrentHashMapV8() {
2255          this.counter = new LongAdder();
# Line 2330 | Line 2330 | public class ConcurrentHashMapV8<K, V>
2330          if (initialCapacity < concurrencyLevel)   // Use at least as many bins
2331              initialCapacity = concurrencyLevel;   // as estimated threads
2332          long size = (long)(1.0 + (long)initialCapacity / loadFactor);
2333 <        int cap = ((size >= (long)MAXIMUM_CAPACITY) ?
2334 <                   MAXIMUM_CAPACITY: tableSizeFor((int)size));
2333 >        int cap = (size >= (long)MAXIMUM_CAPACITY) ?
2334 >            MAXIMUM_CAPACITY : tableSizeFor((int)size);
2335          this.counter = new LongAdder();
2336          this.sizeCtl = cap;
2337      }
# Line 2940 | Line 2940 | public class ConcurrentHashMapV8<K, V>
2940  
2941          /**
2942           * Sets our entry's value and writes through to the map. The
2943 <         * value to return is somewhat arbitrary here. Since a we do
2944 <         * not necessarily track asynchronous changes, the most recent
2943 >         * value to return is somewhat arbitrary here. Since we do not
2944 >         * necessarily track asynchronous changes, the most recent
2945           * "previous" value could be different from what we return (or
2946           * could even have been removed in which case the put will
2947           * re-establish). We do not and cannot guarantee more.

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines