<div dir="ltr"><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Mar 21, 2013 at 1:17 PM, Galder Zamarreño <span dir="ltr">&lt;<a href="mailto:galder@redhat.com" target="_blank">galder@redhat.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="im"><br>
On Mar 20, 2013, at 11:52 AM, Manik Surtani &lt;<a href="mailto:msurtani@redhat.com">msurtani@redhat.com</a>&gt; wrote:<br>
<br>
&gt;<br>
&gt; On 18 Mar 2013, at 12:21, Galder Zamarreño &lt;<a href="mailto:galder@redhat.com">galder@redhat.com</a>&gt; wrote:<br>
&gt;<br>
&gt;&gt; This is why, I&#39;ve created a new CHM, based on the CHMv8, called ComparingConcurrentHashMapv8 (thx Tristan for the name!). The work for this can be seen in:<a href="https://github.com/galderz/infinispan/commit/351e29d327d163ca8e941edf873f6d46b43cfae1" target="_blank">https://github.com/galderz/infinispan/commit/351e29d327d163ca8e941edf873f6d46b43cfae1</a><br>


&gt;<br>
&gt; Sounds good, but why not extend org.infinispan.util.concurrent.jdk8backported.ConcurrentHashMapV8?<br>
<br>
</div>To be honest, I&#39;m considering keeping only one ConcurrentHashMapV8 around, which had the Comparing functions pluggable…, and I might end up doing that. IOW, a ComparingConcurrentHashMapV8 instance created with ComparingObject function for both keys and values is functionality equivalent ConcurrentHashMapV8 with little/hardly impact.<br>


<br>
I originally wanted to keep two versions so that I could more easily port over changes in JSR-166 to org.infinispan.util.concurrent.jdk8backported.ConcurrentHashMapV8, and then pass this on to ComparingCHMv8… but I don&#39;t think it&#39;s worth it.<br>


<br></blockquote></div><br></div><div class="gmail_extra">Interesting, the extra166y package had a CustomConcurrentHashMap [1] that did exactly what you want, but Doug Lea didn&#39;t port it over to ConcurrentHashMapV8. Guava too has a CustomConcurrentHashMap class, but it&#39;s also based on the old ConcurrentHashMap code.<br>

<br></div><div class="gmail_extra">I think maintaining one ConcurrentHashMapV8 class is hard enough, and I doubt there would be any performance difference between the two versions. So I vote to keep only the Comparing version.<br>

</div><div class="gmail_extra"><br>[1] <a href="http://gee.cs.oswego.edu/dl/jsr166/dist/extra166ydocs/extra166y/CustomConcurrentHashMap.html">http://gee.cs.oswego.edu/dl/jsr166/dist/extra166ydocs/extra166y/CustomConcurrentHashMap.html</a><br>

</div></div>