[infinispan-dev] ConcurrentMap new methods implementation
Katia Aresti
karesti at redhat.com
Wed Mar 22 15:46:05 EDT 2017
Hi all,
Since Java 8, some new methods are available in the ConcurrentMap
interface: merge, compute, computeIfAbsent, computeIfPresent, forEach,
replaceAll. ConcurrentMap interface provides a default implementation.
I'm working on https://issues.jboss.org/browse/ISPN-5728 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.
I see two possibilities here, please fell free to suggest any other idea.
1) Override the default implementation and specify on the release that all
the lambdas must be serializables from now on ... ?
2) Leave the implementation of the default methods as they are and provide
new methods implemented the infinispan way :
V compute(K key, V compute(K key,
SerializableBiFunction<? super K, ? super V, ?
extends V> remappingFunction)
What do you think ?
-- Katia
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/infinispan-dev/attachments/20170322/6610e59b/attachment.html
More information about the infinispan-dev
mailing list