8015963: Add at since tags to new ConcurrentHashMap methods
Aleksey Shipilev
aleksey.shipilev at oracle.com
Wed Jun 5 13:39:55 UTC 2013
Looks good to me.
-Aleksey.
On 06/05/2013 02:42 PM, Chris Hegarty wrote:
> Just some minor cleanup after the integration of CHMv8. Trivially, add
> @since 1.8 tags to the 34 new methods and 1 new class in ConcurrentHashMap.
>
> http://cr.openjdk.java.net/~chegar/8015963/webrev.00/webrev/src/share/classes/java/util/concurrent/ConcurrentHashMap.java.udiff.html
>
>
> Doug,
> Here is a patch based on you CVS.
>
> RCS file:
> /home/jsr166/jsr166/jsr166/src/main/java/util/concurrent/ConcurrentHashMap.java,v
>
> retrieving revision 1.219
> diff -u -r1.219 ConcurrentHashMap.java
> --- ConcurrentHashMap.java 1 Jun 2013 18:19:08 -0000 1.219
> +++ ConcurrentHashMap.java 5 Jun 2013 10:31:56 -0000
> @@ -2578,6 +2578,8 @@
> * from the given type to {@code Boolean.TRUE}.
> *
> * @return the new set
> + *
> + * @since 1.8
> */
> public static <K> KeySetView<K,Boolean> newKeySet() {
> return new KeySetView<K,Boolean>
> @@ -2593,6 +2595,8 @@
> * @throws IllegalArgumentException if the initial capacity of
> * elements is negative
> * @return the new set
> + *
> + * @since 1.8
> */
> public static <K> KeySetView<K,Boolean> newKeySet(int
> initialCapacity) {
> return new KeySetView<K,Boolean>
> @@ -2624,6 +2628,8 @@
> * there are concurrent insertions or removals.
> *
> * @return the number of mappings
> + *
> + * @since 1.8
> */
> public long mappingCount() {
> long n = sumCount();
> @@ -3293,6 +3299,8 @@
> * @param parallelismThreshold the (estimated) number of elements
> * needed for this operation to be executed in parallel
> * @param action the action
> + *
> + * @since 1.8
> */
> public void forEach(long parallelismThreshold,
> BiConsumer<? super K,? super V> action) {
> @@ -3312,6 +3320,8 @@
> * for an element, or null if there is no transformation (in
> * which case the action is not applied)
> * @param action the action
> + *
> + * @since 1.8
> */
> public <U> void forEach(long parallelismThreshold,
> BiFunction<? super K, ? super V, ? extends
> U> transformer,
> @@ -3336,6 +3346,8 @@
> * result on success, else null
> * @return a non-null result from applying the given search
> * function on each (key, value), or null if none
> + *
> + * @since 1.8
> */
> public <U> U search(long parallelismThreshold,
> BiFunction<? super K, ? super V, ? extends U>
> searchFunction) {
> @@ -3358,6 +3370,8 @@
> * @param reducer a commutative associative combining function
> * @return the result of accumulating the given transformation
> * of all (key, value) pairs
> + *
> + * @since 1.8
> */
> public <U> U reduce(long parallelismThreshold,
> BiFunction<? super K, ? super V, ? extends U>
> transformer,
> @@ -3382,6 +3396,8 @@
> * @param reducer a commutative associative combining function
> * @return the result of accumulating the given transformation
> * of all (key, value) pairs
> + *
> + * @since 1.8
> */
> public double reduceToDoubleIn(long parallelismThreshold,
> ToDoubleBiFunction<? super K, ?
> super V> transformer,
> @@ -3407,6 +3423,8 @@
> * @param reducer a commutative associative combining function
> * @return the result of accumulating the given transformation
> * of all (key, value) pairs
> + *
> + * @since 1.8
> */
> public long reduceToLong(long parallelismThreshold,
> ToLongBiFunction<? super K, ? super V>
> transformer,
> @@ -3432,6 +3450,8 @@
> * @param reducer a commutative associative combining function
> * @return the result of accumulating the given transformation
> * of all (key, value) pairs
> + *
> + * @since 1.8
> */
> public int reduceToInt(long parallelismThreshold,
> ToIntBiFunction<? super K, ? super V>
> transformer,
> @@ -3450,6 +3470,8 @@
> * @param parallelismThreshold the (estimated) number of elements
> * needed for this operation to be executed in parallel
> * @param action the action
> + *
> + * @since 1.8
> */
> public void forEachKey(long parallelismThreshold,
> Consumer<? super K> action) {
> @@ -3469,6 +3491,8 @@
> * for an element, or null if there is no transformation (in
> * which case the action is not applied)
> * @param action the action
> + *
> + * @since 1.8
> */
> public <U> void forEachKey(long parallelismThreshold,
> Function<? super K, ? extends U>
> transformer,
> @@ -3493,6 +3517,8 @@
> * result on success, else null
> * @return a non-null result from applying the given search
> * function on each key, or null if none
> + *
> + * @since 1.8
> */
> public <U> U searchKeys(long parallelismThreshold,
> Function<? super K, ? extends U>
> searchFunction) {
> @@ -3511,6 +3537,8 @@
> * @param reducer a commutative associative combining function
> * @return the result of accumulating all keys using the given
> * reducer to combine values, or null if none
> + *
> + * @since 1.8
> */
> public K reduceKeys(long parallelismThreshold,
> BiFunction<? super K, ? super K, ? extends K>
> reducer) {
> @@ -3533,6 +3561,8 @@
> * @param reducer a commutative associative combining function
> * @return the result of accumulating the given transformation
> * of all keys
> + *
> + * @since 1.8
> */
> public <U> U reduceKeys(long parallelismThreshold,
> Function<? super K, ? extends U> transformer,
> @@ -3557,6 +3587,8 @@
> * @param reducer a commutative associative combining function
> * @return the result of accumulating the given transformation
> * of all keys
> + *
> + * @since 1.8
> */
> public double reduceKeysToDouble(long parallelismThreshold,
> ToDoubleFunction<? super K>
> transformer,
> @@ -3582,6 +3614,8 @@
> * @param reducer a commutative associative combining function
> * @return the result of accumulating the given transformation
> * of all keys
> + *
> + * @since 1.8
> */
> public long reduceKeysToLong(long parallelismThreshold,
> ToLongFunction<? super K> transformer,
> @@ -3607,6 +3641,8 @@
> * @param reducer a commutative associative combining function
> * @return the result of accumulating the given transformation
> * of all keys
> + *
> + * @since 1.8
> */
> public int reduceKeysToInt(long parallelismThreshold,
> ToIntFunction<? super K> transformer,
> @@ -3625,6 +3661,8 @@
> * @param parallelismThreshold the (estimated) number of elements
> * needed for this operation to be executed in parallel
> * @param action the action
> + *
> + * @since 1.8
> */
> public void forEachValue(long parallelismThreshold,
> Consumer<? super V> action) {
> @@ -3645,6 +3683,8 @@
> * for an element, or null if there is no transformation (in
> * which case the action is not applied)
> * @param action the action
> + *
> + * @since 1.8
> */
> public <U> void forEachValue(long parallelismThreshold,
> Function<? super V, ? extends U>
> transformer,
> @@ -3669,6 +3709,8 @@
> * result on success, else null
> * @return a non-null result from applying the given search
> * function on each value, or null if none
> + *
> + * @since 1.8
> */
> public <U> U searchValues(long parallelismThreshold,
> Function<? super V, ? extends U>
> searchFunction) {
> @@ -3686,6 +3728,8 @@
> * needed for this operation to be executed in parallel
> * @param reducer a commutative associative combining function
> * @return the result of accumulating all values
> + *
> + * @since 1.8
> */
> public V reduceValues(long parallelismThreshold,
> BiFunction<? super V, ? super V, ? extends V>
> reducer) {
> @@ -3708,6 +3752,8 @@
> * @param reducer a commutative associative combining function
> * @return the result of accumulating the given transformation
> * of all values
> + *
> + * @since 1.8
> */
> public <U> U reduceValues(long parallelismThreshold,
> Function<? super V, ? extends U>
> transformer,
> @@ -3732,6 +3778,8 @@
> * @param reducer a commutative associative combining function
> * @return the result of accumulating the given transformation
> * of all values
> + *
> + * @since 1.8
> */
> public double reduceValuesToDouble(long parallelismThreshold,
> ToDoubleFunction<? super V>
> transformer,
> @@ -3757,6 +3805,8 @@
> * @param reducer a commutative associative combining function
> * @return the result of accumulating the given transformation
> * of all values
> + *
> + * @since 1.8
> */
> public long reduceValuesToLong(long parallelismThreshold,
> ToLongFunction<? super V> transformer,
> @@ -3782,6 +3832,8 @@
> * @param reducer a commutative associative combining function
> * @return the result of accumulating the given transformation
> * of all values
> + *
> + * @since 1.8
> */
> public int reduceValuesToInt(long parallelismThreshold,
> ToIntFunction<? super V> transformer,
> @@ -3800,6 +3852,8 @@
> * @param parallelismThreshold the (estimated) number of elements
> * needed for this operation to be executed in parallel
> * @param action the action
> + *
> + * @since 1.8
> */
> public void forEachEntry(long parallelismThreshold,
> Consumer<? super Map.Entry<K,V>> action) {
> @@ -3818,6 +3872,8 @@
> * for an element, or null if there is no transformation (in
> * which case the action is not applied)
> * @param action the action
> + *
> + * @since 1.8
> */
> public <U> void forEachEntry(long parallelismThreshold,
> Function<Map.Entry<K,V>, ? extends U>
> transformer,
> @@ -3842,6 +3898,8 @@
> * result on success, else null
> * @return a non-null result from applying the given search
> * function on each entry, or null if none
> + *
> + * @since 1.8
> */
> public <U> U searchEntries(long parallelismThreshold,
> Function<Map.Entry<K,V>, ? extends U>
> searchFunction) {
> @@ -3859,6 +3917,8 @@
> * needed for this operation to be executed in parallel
> * @param reducer a commutative associative combining function
> * @return the result of accumulating all entries
> + *
> + * @since 1.8
> */
> public Map.Entry<K,V> reduceEntries(long parallelismThreshold,
> BiFunction<Map.Entry<K,V>,
> Map.Entry<K,V>, ? extends Map.Entry<K,V>> reducer) {
> @@ -3881,6 +3941,8 @@
> * @param reducer a commutative associative combining function
> * @return the result of accumulating the given transformation
> * of all entries
> + *
> + * @since 1.8
> */
> public <U> U reduceEntries(long parallelismThreshold,
> Function<Map.Entry<K,V>, ? extends U>
> transformer,
> @@ -3905,6 +3967,8 @@
> * @param reducer a commutative associative combining function
> * @return the result of accumulating the given transformation
> * of all entries
> + *
> + * @since 1.8
> */
> public double reduceEntriesToDouble(long parallelismThreshold,
>
> ToDoubleFunction<Map.Entry<K,V>> transformer,
> @@ -3930,6 +3994,8 @@
> * @param reducer a commutative associative combining function
> * @return the result of accumulating the given transformation
> * of all entries
> + *
> + * @since 1.8
> */
> public long reduceEntriesToLong(long parallelismThreshold,
> ToLongFunction<Map.Entry<K,V>>
> transformer,
> @@ -3955,6 +4021,8 @@
> * @param reducer a commutative associative combining function
> * @return the result of accumulating the given transformation
> * of all entries
> + *
> + * @since 1.8
> */
> public int reduceEntriesToInt(long parallelismThreshold,
> ToIntFunction<Map.Entry<K,V>>
> transformer,
> @@ -4130,6 +4198,8 @@
> * {@link #keySet(Object) keySet(V)},
> * {@link #newKeySet() newKeySet()},
> * {@link #newKeySet(int) newKeySet(int)}.
> + *
> + * @since 1.8
> */
> public static class KeySetView<K,V> extends CollectionView<K,V,K>
> implements Set<K>, java.io.Serializable {
>
> -Chris.
>
>
>
More information about the core-libs-dev
mailing list