diff --git a/akka-stream/src/main/scala/akka/stream/javadsl/Flow.scala b/akka-stream/src/main/scala/akka/stream/javadsl/Flow.scala index 6f70412664..39d5e1ab90 100644 --- a/akka-stream/src/main/scala/akka/stream/javadsl/Flow.scala +++ b/akka-stream/src/main/scala/akka/stream/javadsl/Flow.scala @@ -334,8 +334,9 @@ final class Flow[-In, +Out, +Mat](delegate: scaladsl.Flow[In, Out, Mat]) extends /** * Transform this stream by applying the given function to each of the elements * as they pass through this processing step. The function returns a `CompletionStage` and the - * value of that future will be emitted downstream. As many futures as requested elements by - * downstream may run in parallel and may complete in any order, but the elements that + * value of that future will be emitted downstream. The number of CompletionStages + * that shall run in parallel is given as the first argument to ``mapAsync``. + * These CompletionStages may complete in any order, but the elements that * are emitted downstream are in the same order as received from upstream. * * If the function `f` throws an exception or if the `CompletionStage` is completed @@ -365,10 +366,10 @@ final class Flow[-In, +Out, +Mat](delegate: scaladsl.Flow[In, Out, Mat]) extends /** * Transform this stream by applying the given function to each of the elements * as they pass through this processing step. The function returns a `CompletionStage` and the - * value of that future will be emitted downstream. As many futures as requested elements by - * downstream may run in parallel and each processed element will be emitted downstream - * as soon as it is ready, i.e. it is possible that the elements are not emitted downstream - * in the same order as received from upstream. + * value of that future will be emitted downstream. The number of CompletionStages + * that shall run in parallel is given as the first argument to ``mapAsyncUnordered``. + * Each processed element will be emitted downstream as soon as it is ready, i.e. it is possible + * that the elements are not emitted downstream in the same order as received from upstream. * * If the function `f` throws an exception or if the `CompletionStage` is completed * with failure and the supervision decision is [[akka.stream.Supervision#stop]] @@ -1811,8 +1812,8 @@ final class Flow[-In, +Out, +Mat](delegate: scaladsl.Flow[In, Out, Mat]) extends def detach: javadsl.Flow[In, Out, Mat] = new Flow(delegate.detach) /** - * Materializes to `Future[Done]` that completes on getting termination message. - * The Future completes with success when received complete message from upstream or cancel + * Materializes to `CompletionStage` that completes on getting termination message. + * The future completes with success when received complete message from upstream or cancel * from downstream. It fails with the same error when received error message from * downstream. */ diff --git a/akka-stream/src/main/scala/akka/stream/javadsl/Source.scala b/akka-stream/src/main/scala/akka/stream/javadsl/Source.scala index 8d827acde7..23ce09c080 100644 --- a/akka-stream/src/main/scala/akka/stream/javadsl/Source.scala +++ b/akka-stream/src/main/scala/akka/stream/javadsl/Source.scala @@ -1030,8 +1030,9 @@ final class Source[+Out, +Mat](delegate: scaladsl.Source[Out, Mat]) extends Grap /** * Transform this stream by applying the given function to each of the elements * as they pass through this processing step. The function returns a `CompletionStage` and the - * value of that future will be emitted downstream. As many CompletionStages as requested elements by - * downstream may run in parallel and may complete in any order, but the elements that + * value of that future will be emitted downstream. The number of CompletionStages + * that shall run in parallel is given as the first argument to ``mapAsync``. + * These CompletionStages may complete in any order, but the elements that * are emitted downstream are in the same order as received from upstream. * * If the function `f` throws an exception or if the `CompletionStage` is completed @@ -1061,10 +1062,10 @@ final class Source[+Out, +Mat](delegate: scaladsl.Source[Out, Mat]) extends Grap /** * Transform this stream by applying the given function to each of the elements * as they pass through this processing step. The function returns a `CompletionStage` and the - * value of that future will be emitted downstream. As many CompletionStages as requested elements by - * downstream may run in parallel and each processed element will be emitted downstream - * as soon as it is ready, i.e. it is possible that the elements are not emitted downstream - * in the same order as received from upstream. + * value of that future will be emitted downstream. The number of CompletionStages + * that shall run in parallel is given as the first argument to ``mapAsyncUnordered``. + * Each processed element will be emitted downstream as soon as it is ready, i.e. it is possible + * that the elements are not emitted downstream in the same order as received from upstream. * * If the function `f` throws an exception or if the `CompletionStage` is completed * with failure and the supervision decision is [[akka.stream.Supervision#stop]] diff --git a/akka-stream/src/main/scala/akka/stream/javadsl/SubFlow.scala b/akka-stream/src/main/scala/akka/stream/javadsl/SubFlow.scala index 1bea108a97..eea2e9c848 100644 --- a/akka-stream/src/main/scala/akka/stream/javadsl/SubFlow.scala +++ b/akka-stream/src/main/scala/akka/stream/javadsl/SubFlow.scala @@ -173,8 +173,9 @@ class SubFlow[-In, +Out, +Mat](delegate: scaladsl.SubFlow[Out, Mat, scaladsl.Flo /** * Transform this stream by applying the given function to each of the elements * as they pass through this processing step. The function returns a `CompletionStage` and the - * value of that future will be emitted downstream. As many CompletionStages as requested elements by - * downstream may run in parallel and may complete in any order, but the elements that + * value of that future will be emitted downstream. The number of CompletionStages + * that shall run in parallel is given as the first argument to ``mapAsync``. + * These CompletionStages may complete in any order, but the elements that * are emitted downstream are in the same order as received from upstream. * * If the function `f` throws an exception or if the `CompletionStage` is completed @@ -204,10 +205,10 @@ class SubFlow[-In, +Out, +Mat](delegate: scaladsl.SubFlow[Out, Mat, scaladsl.Flo /** * Transform this stream by applying the given function to each of the elements * as they pass through this processing step. The function returns a `CompletionStage` and the - * value of that future will be emitted downstream. As many CompletionStages as requested elements by - * downstream may run in parallel and each processed element will be emitted downstream - * as soon as it is ready, i.e. it is possible that the elements are not emitted downstream - * in the same order as received from upstream. + * value of that future will be emitted downstream. The number of CompletionStages + * that shall run in parallel is given as the first argument to ``mapAsyncUnordered``. + * Each processed element will be emitted downstream as soon as it is ready, i.e. it is possible + * that the elements are not emitted downstream in the same order as received from upstream. * * If the function `f` throws an exception or if the `CompletionStage` is completed * with failure and the supervision decision is [[akka.stream.Supervision#stop]] diff --git a/akka-stream/src/main/scala/akka/stream/javadsl/SubSource.scala b/akka-stream/src/main/scala/akka/stream/javadsl/SubSource.scala index 8113b0154a..c3f08dffcf 100644 --- a/akka-stream/src/main/scala/akka/stream/javadsl/SubSource.scala +++ b/akka-stream/src/main/scala/akka/stream/javadsl/SubSource.scala @@ -171,8 +171,9 @@ class SubSource[+Out, +Mat](delegate: scaladsl.SubFlow[Out, Mat, scaladsl.Source /** * Transform this stream by applying the given function to each of the elements * as they pass through this processing step. The function returns a `CompletionStage` and the - * value of that future will be emitted downstream. As many CompletionStages as requested elements by - * downstream may run in parallel and may complete in any order, but the elements that + * value of that future will be emitted downstream. The number of CompletionStages + * that shall run in parallel is given as the first argument to ``mapAsync``. + * These CompletionStages may complete in any order, but the elements that * are emitted downstream are in the same order as received from upstream. * * If the function `f` throws an exception or if the `CompletionStage` is completed @@ -202,10 +203,10 @@ class SubSource[+Out, +Mat](delegate: scaladsl.SubFlow[Out, Mat, scaladsl.Source /** * Transform this stream by applying the given function to each of the elements * as they pass through this processing step. The function returns a `CompletionStage` and the - * value of that future will be emitted downstream. As many CompletionStages as requested elements by - * downstream may run in parallel and each processed element will be emitted downstream - * as soon as it is ready, i.e. it is possible that the elements are not emitted downstream - * in the same order as received from upstream. + * value of that future will be emitted downstream. The number of CompletionStages + * that shall run in parallel is given as the first argument to ``mapAsyncUnordered``. + * Each processed element will be emitted downstream as soon as it is ready, i.e. it is possible + * that the elements are not emitted downstream in the same order as received from upstream. * * If the function `f` throws an exception or if the `CompletionStage` is completed * with failure and the supervision decision is [[akka.stream.Supervision#stop]] diff --git a/akka-stream/src/main/scala/akka/stream/scaladsl/Flow.scala b/akka-stream/src/main/scala/akka/stream/scaladsl/Flow.scala index f5f2a9677f..93c2d40088 100644 --- a/akka-stream/src/main/scala/akka/stream/scaladsl/Flow.scala +++ b/akka-stream/src/main/scala/akka/stream/scaladsl/Flow.scala @@ -559,10 +559,10 @@ trait FlowOps[+Out, +Mat] { /** * Transform this stream by applying the given function to each of the elements * as they pass through this processing step. The function returns a `Future` and the - * value of that future will be emitted downstream. As many futures as requested elements by - * downstream may run in parallel and each processed element will be emitted downstream - * as soon as it is ready, i.e. it is possible that the elements are not emitted downstream - * in the same order as received from upstream. + * value of that future will be emitted downstream. The number of Futures + * that shall run in parallel is given as the first argument to ``mapAsyncUnordered``. + * Each processed element will be emitted downstream as soon as it is ready, i.e. it is possible + * that the elements are not emitted downstream in the same order as received from upstream. * * If the function `f` throws an exception or if the `Future` is completed * with failure and the supervision decision is [[akka.stream.Supervision.Stop]]