<div dir="ltr"><span style="font-size:12.8px">Hi all,</span><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">Since Java 8, some new methods are available in the ConcurrentMap interface: merge, compute, computeIfAbsent, computeIfPresent, forEach, replaceAll. ConcurrentMap interface provides a default implementation.</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">I&#39;m working on <a href="https://issues.jboss.org/browse/ISPN-5728" target="_blank">https://issues.jboss.org/<wbr>browse/ISPN-5728</a> in order to provide the infinispan specific implementation. The issue here is that to make it work, these lambdas must be Serializables, so actual code using these methods and not passing serializables lambdas will break.</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">I see two possibilities here, please fell free to suggest any other idea.</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">1) Override the default implementation and specify on the release that all the lambdas must be serializables from now on ... ? </div><div style="font-size:12.8px">2)  Leave the implementation of the default methods as they are and provide new methods implemented the infinispan way :</div><div style="font-size:12.8px"><pre style="white-space:pre-wrap;color:rgb(0,0,0);font-family:menlo;font-size:9pt"><span style="color:rgb(32,153,157)">V </span>compute(<span style="color:rgb(32,153,157)">K </span>key, V <span style="font-size:9pt">compute(</span><span style="font-size:9pt;color:rgb(32,153,157)">K </span><span style="font-size:9pt">key,</span><br></pre></div><div style="font-size:12.8px"><pre style="white-space:pre-wrap;color:rgb(0,0,0);font-family:menlo;font-size:9pt">                  SerializableBiFunction&lt;? <span style="color:rgb(0,0,128);font-weight:bold">super </span><span style="color:rgb(32,153,157)">K</span>, ? <span style="color:rgb(0,0,128);font-weight:bold">super </span><span style="color:rgb(32,153,157)">V</span>, ? <span style="color:rgb(0,0,128);font-weight:bold">extends </span><span style="color:rgb(32,153,157)">V</span>&gt; remappingFunction)</pre></div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px"><div>What do you think ?</div><div><br></div><div>-- Katia</div><div class="gmail-yj6qo gmail-ajU" style="margin:2px 0px 0px"><div id="gmail-:un" class="gmail-ajR" tabindex="0"><img class="gmail-ajT" src="https://ssl.gstatic.com/ui/v1/icons/mail/images/cleardot.gif"></div></div></div></div>