pjfanning commented on code in PR #849:
URL: https://github.com/apache/incubator-pekko/pull/849#discussion_r1429193099
##########
stream/src/main/scala/org/apache/pekko/stream/javadsl/Sink.scala:
##########
@@ -372,10 +373,42 @@ object Sink {
output1: Sink[U, _],
output2: Sink[U, _],
rest: java.util.List[Sink[U, _]],
- strategy: function.Function[java.lang.Integer,
Graph[UniformFanOutShape[T, U], NotUsed]]): Sink[T, NotUsed] = {
+ @nowarn
+ @deprecatedName(Symbol("strategy"))
+ fanOutStrategy: function.Function[java.lang.Integer,
Graph[UniformFanOutShape[T, U], NotUsed]])
+ : Sink[T, NotUsed] = {
import pekko.util.ccompat.JavaConverters._
val seq = if (rest != null) rest.asScala.map(_.asScala).toSeq else
immutable.Seq()
- new Sink(scaladsl.Sink.combine(output1.asScala, output2.asScala, seq:
_*)(num => strategy.apply(num)))
+ new Sink(scaladsl.Sink.combine(output1.asScala, output2.asScala, seq:
_*)(num => fanOutStrategy.apply(num)))
+ }
+
+ /**
+ * Combine two sinks with fan-out strategy like `Broadcast` or `Balance` and
returns `Sink` with 2 outlets.
+ */
+ def combineMat[T, U, M1, M2, M](
Review Comment:
can you add `@since 1.1.0` to the new public methods?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]