ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/extra166y/CustomConcurrentHashMap.java
(Generate patch)

Comparing jsr166/src/extra166y/CustomConcurrentHashMap.java (file contents):
Revision 1.17 by jsr166, Tue Mar 15 19:47:02 2011 UTC vs.
Revision 1.23 by jsr166, Sat Dec 29 23:55:19 2012 UTC

# Line 697 | Line 697 | public class CustomConcurrentHashMap<K,
697      /**
698       * Returns the value associated with a key equivalent to the given
699       * key with respect to this map's key Equivalence, or {@code null}
700 <     * if no such mapping exists
700 >     * if no such mapping exists.
701       *
702       * @param  key   possible key
703       * @return the value associated with the key or <tt>null</tt> if
# Line 942 | Line 942 | public class CustomConcurrentHashMap<K,
942      }
943  
944      /**
945 <     * Remove node if its key or value are null
945 >     * Removes node if its key or value are null.
946       */
947      final void removeIfReclaimed(Node r) {
948          int hash = r.getLocator();
# Line 1551 | Line 1551 | public class CustomConcurrentHashMap<K,
1551      }
1552  
1553      /**
1554 <     * Save the state of the instance to a stream (i.e., serialize
1555 <     * it).
1554 >     * Saves the state of the instance to a stream (i.e., serializes it).
1555 >     *
1556       * @param s the stream
1557       * @serialData
1558       * the key (Object) and value (Object)
# Line 1570 | Line 1570 | public class CustomConcurrentHashMap<K,
1570      }
1571  
1572      /**
1573 <     * Reconstitute the instance from a stream (i.e., deserialize it).
1573 >     * Reconstitutes the instance from a stream (that is, deserializes it).
1574       * @param s the stream
1575       */
1576      private void readObject(java.io.ObjectInputStream s)
# Line 1621 | Line 1621 | public class CustomConcurrentHashMap<K,
1621           * exists, else adds and returns the given element.
1622           *
1623           * @param e the element
1624 <         * @return e, or an element equivalent to e.
1624 >         * @return e, or an element equivalent to e
1625           */
1626          public K intern(K e) {
1627              K oldElement = cchm.doPut(e, e, true);
# Line 3045 | Line 3045 | public class CustomConcurrentHashMap<K,
3045      }
3046  
3047      // Fenced store into segment table array. Unneeded when we have Fences
3048 <    static final  void storeNode(Node[] table,
3049 <                                 int i, Node r) {
3048 >    static final void storeNode(Node[] table,
3049 >                                int i, Node r) {
3050          long nodeOffset = ((long) i << tableShift) + tableBase;
3051          UNSAFE.putOrderedObject(table, nodeOffset, r);
3052      }
3053  
3054 <    static final  void storeSegment(Segment[] segs,
3055 <                                    int i, Segment s) {
3054 >    static final void storeSegment(Segment[] segs,
3055 >                                   int i, Segment s) {
3056          long segmentOffset = ((long) i << segmentsShift) + segmentsBase;
3057          UNSAFE.putOrderedObject(segs, segmentOffset, s);
3058      }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines