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.320 by jsr166, Sun Sep 8 01:11:03 2019 UTC vs.
Revision 1.321 by dl, Sun Oct 6 20:25:09 2019 UTC

# Line 1638 | Line 1638 | public class ConcurrentHashMap<K,V> exte
1638       * If the specified key is not already associated with a value,
1639       * attempts to compute its value using the given mapping function
1640       * and enters it into this map unless {@code null}.  The entire
1641 <     * method invocation is performed atomically, so the function is
1642 <     * applied at most once per key.  Some attempted update operations
1643 <     * on this map by other threads may be blocked while computation
1644 <     * is in progress, so the computation should be short and simple,
1645 <     * and must not attempt to update any other mappings of this map.
1641 >     * method invocation is performed atomically.  The supplied
1642 >     * function is invoked exactly once per invocation of this method
1643 >     * if the key is absent, else not at all.  Some attempted update
1644 >     * operations on this map by other threads may be blocked while
1645 >     * computation is in progress, so the computation should be short
1646 >     * and simple, and must not attempt to update any other mappings
1647 >     * of this map.
1648       *
1649       * @param key key with which the specified value is to be associated
1650       * @param mappingFunction the function to compute a value
# Line 1749 | Line 1751 | public class ConcurrentHashMap<K,V> exte
1751       * If the value for the specified key is present, attempts to
1752       * compute a new mapping given the key and its current mapped
1753       * value.  The entire method invocation is performed atomically.
1754 <     * Some attempted update operations on this map by other threads
1755 <     * may be blocked while computation is in progress, so the
1756 <     * computation should be short and simple, and must not attempt to
1757 <     * update any other mappings of this map.
1754 >     * The supplied function is invoked exactly once per invocation of
1755 >     * this method if the key is present, else not at all.  Some
1756 >     * attempted update operations on this map by other threads may be
1757 >     * blocked while computation is in progress, so the computation
1758 >     * should be short and simple, and must not attempt to update any
1759 >     * other mappings of this map.
1760       *
1761       * @param key key with which a value may be associated
1762       * @param remappingFunction the function to compute a value
# Line 1841 | Line 1845 | public class ConcurrentHashMap<K,V> exte
1845       * Attempts to compute a mapping for the specified key and its
1846       * current mapped value (or {@code null} if there is no current
1847       * mapping). The entire method invocation is performed atomically.
1848 <     * Some attempted update operations on this map by other threads
1849 <     * may be blocked while computation is in progress, so the
1850 <     * computation should be short and simple, and must not attempt to
1851 <     * update any other mappings of this Map.
1848 >     * The supplied function is invoked exactly once per invocation of
1849 >     * this method.  Some attempted update operations on this map by
1850 >     * other threads may be blocked while computation is in progress,
1851 >     * so the computation should be short and simple, and must not
1852 >     * attempt to update any other mappings of this Map.
1853       *
1854       * @param key key with which the specified value is to be associated
1855       * @param remappingFunction the function to compute a value

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines