pjfanning commented on code in PR #3392:
URL: https://github.com/apache/pekko/pull/3392#discussion_r3662656679


##########
stream/src/main/scala/org/apache/pekko/stream/javadsl/Hub.scala:
##########
@@ -98,6 +126,40 @@ object MergeHub {
       .asJava
   }
 
+  /**
+   * Creates a [[Source]] that emits elements merged from a dynamic set of 
producers. After the [[Source]] returned
+   * by this method is materialized, it returns a [[Sink]] as a materialized 
value. This [[Sink]] can be materialized
+   * arbitrarily many times and each of the materializations will feed the 
elements into the original [[Source]].
+   *
+   * Every new materialization of the [[Source]] results in a new, independent 
hub, which materializes to its own
+   * [[Sink]] for feeding that materialization.
+   *
+   * Completed or failed [[Sink]]s are simply removed. Once the [[Source]] is 
cancelled, the Hub is considered closed
+   * and any new producers using the [[Sink]] will be cancelled.
+   *
+   * The materialized [[DrainingControl]] can be used to drain the Hub: any 
new produces using the [[Sink]] will be cancelled
+   * and the Hub will be closed completing the [[Source]] as soon as all 
currently connected producers complete.
+   *
+   * @param clazz Type of elements this hub emits and consumes
+   * @param perProducerBufferSize Buffer space used per producer. Default 
value is 16.
+   * @param maxTotalBufferSize Admission threshold for the total number of 
elements buffered across all producers.
+   *   New producers are cancelled at registration when the buffered element 
count meets or exceeds this value.
+   *   Transient overshoot up to the per-producer buffer of concurrently 
admitted producers is possible.
+   *   Use 0 for unlimited (default behavior).
+   */

Review Comment:
   `@since 2.0.0`



-- 
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]

Reply via email to