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 782ec2d96a..3ba36734ae 100755 --- a/akka-stream/src/main/scala/akka/stream/javadsl/Flow.scala +++ b/akka-stream/src/main/scala/akka/stream/javadsl/Flow.scala @@ -20,6 +20,7 @@ import akka.util.JavaDurationConverters._ import akka.actor.ActorRef import akka.dispatch.ExecutionContexts import akka.stream.impl.fusing.LazyFlow +import akka.stream.scaladsl.Sink import scala.annotation.unchecked.uncheckedVariance import scala.compat.java8.FutureConverters._ @@ -488,6 +489,7 @@ final class Flow[In, Out, Mat](delegate: scaladsl.Flow[In, Out, Mat]) extends Gr * Elements will be passed into this "side channel" function, and any of its results will be ignored. * * If the wire-tap operation is slow (it backpressures), elements that would've been sent to it will be dropped instead. + * It is similar to [[#alsoTo]] but will not affect (i.e. backpressure) the flow tapped into. * * This operation is useful for inspecting the passed through element, usually by means of side-effecting * operations (such as `println`, or emitting metrics), for each element without having to modify it. @@ -2142,6 +2144,8 @@ final class Flow[In, Out, Mat](delegate: scaladsl.Flow[In, Out, Mat]) extends Gr * Attaches the given [[Sink]] to this [[Flow]], meaning that elements that passes * through will also be sent to the [[Sink]]. * + * It is similar to [[#wireTap]] but will backpressure instead of dropping elements when the given [[Sink]] is not ready. + * * '''Emits when''' element is available and demand exists both from the Sink and the downstream. * * '''Backpressures when''' downstream or Sink backpressures @@ -2157,6 +2161,8 @@ final class Flow[In, Out, Mat](delegate: scaladsl.Flow[In, Out, Mat]) extends Gr * Attaches the given [[Sink]] to this [[Flow]], meaning that elements that passes * through will also be sent to the [[Sink]]. * + * It is similar to [[#wireTapMat]] but will backpressure instead of dropping elements when the given [[Sink]] is not ready. + * * It is recommended to use the internally optimized `Keep.left` and `Keep.right` combiners * where appropriate instead of manually writing functions that pass through one of the values. * @@ -2199,6 +2205,8 @@ final class Flow[In, Out, Mat](delegate: scaladsl.Flow[In, Out, Mat]) extends Gr * through will also be sent to the wire-tap Sink, without the latter affecting the mainline flow. * If the wire-tap Sink backpressures, elements that would've been sent to it will be dropped instead. * + * It is similar to [[#alsoTo]] which does backpressure instead of dropping elements. + * * '''Emits when''' element is available and demand exists from the downstream; the element will * also be sent to the wire-tap Sink if there is demand. * @@ -2217,6 +2225,8 @@ final class Flow[In, Out, Mat](delegate: scaladsl.Flow[In, Out, Mat]) extends Gr * through will also be sent to the wire-tap Sink, without the latter affecting the mainline flow. * If the wire-tap Sink backpressures, elements that would've been sent to it will be dropped instead. * + * It is similar to [[#alsoToMat]] which does backpressure instead of dropping elements. + * * It is recommended to use the internally optimized `Keep.left` and `Keep.right` combiners * where appropriate instead of manually writing functions that pass through one of the values. * 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 4b58c00bb3..e22451064b 100755 --- a/akka-stream/src/main/scala/akka/stream/javadsl/Source.scala +++ b/akka-stream/src/main/scala/akka/stream/javadsl/Source.scala @@ -784,6 +784,8 @@ final class Source[Out, Mat](delegate: scaladsl.Source[Out, Mat]) extends Graph[ * Attaches the given [[Sink]] to this [[Flow]], meaning that elements that passes * through will also be sent to the [[Sink]]. * + * It is similar to [[#wireTap]] but will backpressure instead of dropping elements when the given [[Sink]] is not ready. + * * '''Emits when''' element is available and demand exists both from the Sink and the downstream. * * '''Backpressures when''' downstream or Sink backpressures @@ -799,6 +801,8 @@ final class Source[Out, Mat](delegate: scaladsl.Source[Out, Mat]) extends Graph[ * Attaches the given [[Sink]] to this [[Flow]], meaning that elements that passes * through will also be sent to the [[Sink]]. * + * It is similar to [[#wireTapMat]] but will backpressure instead of dropping elements when the given [[Sink]] is not ready. + * * It is recommended to use the internally optimized `Keep.left` and `Keep.right` combiners * where appropriate instead of manually writing functions that pass through one of the values. * @@ -841,6 +845,8 @@ final class Source[Out, Mat](delegate: scaladsl.Source[Out, Mat]) extends Graph[ * through will also be sent to the wire-tap Sink, without the latter affecting the mainline flow. * If the wire-tap Sink backpressures, elements that would've been sent to it will be dropped instead. * + * It is similar to [[#alsoTo]] which does backpressure instead of dropping elements. + * * '''Emits when''' element is available and demand exists from the downstream; the element will * also be sent to the wire-tap Sink if there is demand. * @@ -859,6 +865,8 @@ final class Source[Out, Mat](delegate: scaladsl.Source[Out, Mat]) extends Graph[ * through will also be sent to the wire-tap Sink, without the latter affecting the mainline flow. * If the wire-tap Sink backpressures, elements that would've been sent to it will be dropped instead. * + * It is similar to [[#alsoToMat]] which does backpressure instead of dropping elements. + * * It is recommended to use the internally optimized `Keep.left` and `Keep.right` combiners * where appropriate instead of manually writing functions that pass through one of the values. * @@ -1227,6 +1235,8 @@ final class Source[Out, Mat](delegate: scaladsl.Source[Out, Mat]) extends Graph[ * * If the wire-tap operation is slow (it backpressures), elements that would've been sent to it will be dropped instead. * + * It is similar to [[#alsoTo]] which does backpressure instead of dropping elements. + * * This operation is useful for inspecting the passed through element, usually by means of side-effecting * operations (such as `println`, or emitting metrics), for each element without having to modify it. * 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 6962e3ffd9..ae5336181b 100755 --- a/akka-stream/src/main/scala/akka/stream/javadsl/SubFlow.scala +++ b/akka-stream/src/main/scala/akka/stream/javadsl/SubFlow.scala @@ -143,6 +143,7 @@ class SubFlow[In, Out, Mat](delegate: scaladsl.SubFlow[Out, Mat, scaladsl.Flow[I * Elements will be passed into this "side channel" function, and any of its results will be ignored. * * If the wire-tap operation is slow (it backpressures), elements that would've been sent to it will be dropped instead. + * It is similar to [[#alsoTo]] which does backpressure instead of dropping elements. * * This operation is useful for inspecting the passed through element, usually by means of side-effecting * operations (such as `println`, or emitting metrics), for each element without having to modify it. @@ -1381,6 +1382,8 @@ class SubFlow[In, Out, Mat](delegate: scaladsl.SubFlow[Out, Mat, scaladsl.Flow[I * Attaches the given [[Sink]] to this [[Flow]], meaning that elements that passes * through will also be sent to the [[Sink]]. * + * It is similar to [[#wireTap]] but will backpressure instead of dropping elements when the given [[Sink]] is not ready. + * * '''Emits when''' element is available and demand exists both from the Sink and the downstream. * * '''Backpressures when''' downstream or Sink backpressures @@ -1412,6 +1415,8 @@ class SubFlow[In, Out, Mat](delegate: scaladsl.SubFlow[Out, Mat, scaladsl.Flow[I * through will also be sent to the wire-tap Sink, without the latter affecting the mainline flow. * If the wire-tap Sink backpressures, elements that would've been sent to it will be dropped instead. * + * It is similar to [[#alsoTo]] which does backpressure instead of dropping elements. + * * '''Emits when''' element is available and demand exists from the downstream; the element will * also be sent to the wire-tap Sink if there is demand. * 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 8a9fae4bf3..4271affcc1 100755 --- a/akka-stream/src/main/scala/akka/stream/javadsl/SubSource.scala +++ b/akka-stream/src/main/scala/akka/stream/javadsl/SubSource.scala @@ -132,6 +132,7 @@ class SubSource[Out, Mat](delegate: scaladsl.SubFlow[Out, Mat, scaladsl.Source[O * Elements will be passed into this "side channel" function, and any of its results will be ignored. * * If the wire-tap operation is slow (it backpressures), elements that would've been sent to it will be dropped instead. + * It is similar to [[#alsoTo]] which does backpressure instead of dropping elements. * * This operation is useful for inspecting the passed through element, usually by means of side-effecting * operations (such as `println`, or emitting metrics), for each element without having to modify it. @@ -1361,6 +1362,8 @@ class SubSource[Out, Mat](delegate: scaladsl.SubFlow[Out, Mat, scaladsl.Source[O * Attaches the given [[Sink]] to this [[Flow]], meaning that elements that passes * through will also be sent to the [[Sink]]. * + * It is similar to [[#wireTap]] but will backpressure instead of dropping elements when the given [[Sink]] is not ready. + * * '''Emits when''' element is available and demand exists both from the Sink and the downstream. * * '''Backpressures when''' downstream or Sink backpressures @@ -1392,6 +1395,8 @@ class SubSource[Out, Mat](delegate: scaladsl.SubFlow[Out, Mat, scaladsl.Source[O * through will also be sent to the wire-tap Sink, without the latter affecting the mainline flow. * If the wire-tap Sink backpressures, elements that would've been sent to it will be dropped instead. * + * It is similar to [[#alsoTo]] which does backpressure instead of dropping elements. + * * '''Emits when''' element is available and demand exists from the downstream; the element will * also be sent to the wire-tap Sink if there is demand. * 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 5c7fabdb13..0fa26b171a 100755 --- a/akka-stream/src/main/scala/akka/stream/scaladsl/Flow.scala +++ b/akka-stream/src/main/scala/akka/stream/scaladsl/Flow.scala @@ -771,6 +771,7 @@ trait FlowOps[+Out, +Mat] { * Elements will be passed into this "side channel" function, and any of its results will be ignored. * * If the wire-tap operation is slow (it backpressures), elements that would've been sent to it will be dropped instead. + * It is similar to [[#alsoTo]] which does backpressure instead of dropping elements. * * This operation is useful for inspecting the passed through element, usually by means of side-effecting * operations (such as `println`, or emitting metrics), for each element without having to modify it. @@ -2682,6 +2683,8 @@ trait FlowOps[+Out, +Mat] { * Attaches the given [[Sink]] to this [[Flow]], meaning that elements that pass * through will also be sent to the [[Sink]]. * + * It is similar to [[#wireTap]] but will backpressure instead of dropping elements when the given [[Sink]] is not ready. + * * '''Emits when''' element is available and demand exists both from the Sink and the downstream. * * '''Backpressures when''' downstream or Sink backpressures @@ -2727,6 +2730,8 @@ trait FlowOps[+Out, +Mat] { * through will also be sent to the wire-tap Sink, without the latter affecting the mainline flow. * If the wire-tap Sink backpressures, elements that would've been sent to it will be dropped instead. * + * It is similar to [[#alsoTo]] which does backpressure instead of dropping elements. + * * '''Emits when''' element is available and demand exists from the downstream; the element will * also be sent to the wire-tap Sink if there is demand. * @@ -3027,6 +3032,8 @@ trait FlowOpsMat[+Out, +Mat] extends FlowOps[Out, Mat] { * through will also be sent to the wire-tap Sink, without the latter affecting the mainline flow. * If the wire-tap Sink backpressures, elements that would've been sent to it will be dropped instead. * + * It is similar to [[#alsoToMat]] which does backpressure instead of dropping elements. + * * @see [[#wireTap]] * * It is recommended to use the internally optimized `Keep.left` and `Keep.right` combiners