Fwd: hg: lambda/lambda/jdk: Add .unordered() operation; eliminate .collectUnordered()
Brian Goetz
brian.goetz at oracle.com
Fri Apr 5 09:28:16 PDT 2013
Stream.collectUnordered has been removed in favor of a more general
.unordered() method (which may be a no-op if the stream is already
unordered.) This allows more stateful and terminal ops to gain the
benefit of opting out of ordering.
The collect(Collector) method currently performs a concurrent collection
when all of the following are true:
- the stream is parallel
- the collector is concurrent
- the collector is unordered OR the stream is unordered
Currently the groupingByConcurrent / toConcurrentMap collectors are not
UNORDERED. Meaning that users still have to have an unordered source
(or ask for unordered explicitly) to get concurrent collection. I'm
currently working through what it would look like if this were reversed,
and these collectors declared UNORDERED.
-------- Original Message --------
Subject: hg: lambda/lambda/jdk: Add .unordered() operation; eliminate
.collectUnordered()
Date: Fri, 05 Apr 2013 16:09:44 +0000
From: brian.goetz at oracle.com
To: lambda-dev at openjdk.java.net
Changeset: adc363b47e78
Author: briangoetz
Date: 2013-04-05 12:09 -0400
URL: http://hg.openjdk.java.net/lambda/lambda/jdk/rev/adc363b47e78
Add .unordered() operation; eliminate .collectUnordered()
! src/share/classes/java/util/stream/AbstractPipeline.java
! src/share/classes/java/util/stream/BaseStream.java
! src/share/classes/java/util/stream/Collector.java
! src/share/classes/java/util/stream/DelegatingStream.java
! src/share/classes/java/util/stream/DoublePipeline.java
! src/share/classes/java/util/stream/IntPipeline.java
! src/share/classes/java/util/stream/LongPipeline.java
! src/share/classes/java/util/stream/ReferencePipeline.java
! src/share/classes/java/util/stream/Stream.java
! test-ng/bootlib/java/util/stream/OpTestCase.java
! test-ng/bootlib/java/util/stream/StreamTestData.java
! test-ng/tests/org/openjdk/tests/java/util/stream/TabulatorsTest.java
More information about the lambda-libs-spec-experts
mailing list