@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(a)cs.oswego.edu>
Subject: [concurrency-interest] ConcurrentHashMapV8 now supports Spliterator
Date: July 4, 2012 1:47:51 AM GMT+02:00
To: "Concurrency-interest(a)cs.oswego.edu"
<Concurrency-interest(a)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/ConcurrentHas...)
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(a)cs.oswego.edu
http://cs.oswego.edu/mailman/listinfo/concurrency-interest
--
Galder Zamarreño
Sr. Software Engineer
Infinispan, JBoss Cache