[infinispan-dev] Fwd: [concurrency-interest] ConcurrentHashMapV8 now supports Spliterator

Galder Zamarreño galder at redhat.com
Mon Jul 9 07:46:17 EDT 2012


@Vladimir, something of potential interest for your distributed executors stuff in the future? Also check the compute/computeIfAbsent operations coming up in new CHM.

Begin forwarded message:

> From: Doug Lea <dl at cs.oswego.edu>
> Subject: [concurrency-interest] ConcurrentHashMapV8 now supports Spliterator
> Date: July 4, 2012 1:47:51 AM GMT+02:00
> To: "Concurrency-interest at cs.oswego.edu" <Concurrency-interest at cs.oswego.edu>
> 
> 
> In addition to including the compute/computeIfAbsent changes
> discussed on this list last week, the updated version of
> ConcurrentHashMapV8 contains basic support for performing
> parallel (normally via ForkJoin) operations on the keys,
> values, or entries of a map.
> 
> The added Spliterator interface (see
> http://gee.cs.oswego.edu/dl/jsr166/dist/jsr166edocs/jsr166e/ConcurrentHashMapV8.Spliterator.html)
> is for now a nested interface that contains a subset of
> some functionality likely to be available in JDK8.
> There are also three new methods to provide them:
>  public Spliterator<K> keySpliterator()
>  public Spliterator<V> valueSpliterator()
>  public Spliterator<Map.Entry<K,V>> entrySpliterator()
> See the Spliterator javadocs for a usage example.
> 
> These methods only provide a foothold for writing your
> own parallel operations. CHMV8 doesn't now itself supply
> the map, filter, reduce, forEach, etc operations expected
> to be supported under JDK8 lambda-ized collections. However,
> they do enable those familiar with ForkJoin programming
> to get a head start evaluating such code you write yourself.
> If you do this, please report back any interesting experiences.
> 
> The usual links:
>    *  API specs:  http://gee.cs.oswego.edu/dl/jsr166/dist/jsr166edocs/
>    * jar file: http://gee.cs.oswego.edu/dl/jsr166/dist/jsr166e.jar (compiled using Java7 javac).
>    * Browsable CVS sources: http://gee.cs.oswego.edu/cgi-bin/viewcvs.cgi/jsr166/src/jsr166e/
> 
> -Doug
> 
> _______________________________________________
> Concurrency-interest mailing list
> Concurrency-interest at cs.oswego.edu
> http://cs.oswego.edu/mailman/listinfo/concurrency-interest

--
Galder Zamarreño
Sr. Software Engineer
Infinispan, JBoss Cache




More information about the infinispan-dev mailing list