RFR 8005704: Update ConcurrentHashMap to v8
chris.hegarty at oracle.com
Tue May 28 10:34:13 UTC 2013
Thank you Doug, this addresses my concerns.
On 05/28/2013 11:29 AM, Doug Lea wrote:
> On 05/27/13 10:30, Chris Hegarty wrote:
>> 1) CHM no longer extends AbstractMap. I guess this should not be a
>> problem in the real world, and I guess users would not be too
>> surprised by instanceof checks. Just worth highlighting the change
>> for compatibility.
> Yes, thanks. It was a bad idea to extend AbstractMap in the first place,
> since all of its methods are or should be overridden. But if
> there is any reason to retain this, it is harmless to do so,
OK, this can be the backup plan if this issue arises during CCC.
> at the expense of adding two unused fields to footprint.
> (The AbstractMap keySet and Values fields cannot be used
> by CHM because they are package-protected, so it needs to
> declare its own versions anyway.)
>> 4) Does is make sense for KeySetView to be Serializable? It looks a
>> little odd with value as its only field.
> (Plus the backing ConcurrentHashMap.)
Yes, of course.
> Serialization is needed (or at least desired) because this class
> is now used for CHM.newKeySet, which finally adds a way to
> get the equivalent of a ConcurrentHashSet. (You could get one
> via Collections.newSetFromMap, but then lose the advertised
> concurrency/atomicity properties.)
More information about the core-libs-dev