He-Pin commented on code in PR #1053:
URL: https://github.com/apache/incubator-pekko/pull/1053#discussion_r1468511471


##########
stream/src/main/scala/org/apache/pekko/stream/javadsl/Source.scala:
##########
@@ -2541,6 +2541,45 @@ final class Source[Out, Mat](delegate: 
scaladsl.Source[Out, Mat]) extends Graph[
         (resource, out) => f(resource, out),
         resource => close.apply(resource).toScala))
 
+  /**
+   * Transform each stream element with the help of a [[AutoCloseable]] 
resource and close it when the stream finishes or fails.
+   *
+   * The resource creation function is invoked once when the stream is 
materialized and the returned resource is passed to
+   * the mapping function for mapping the first element. The mapping function 
returns a mapped element to emit
+   * downstream. The returned `T` MUST NOT be `null` as it is illegal as 
stream element - according to the Reactive Streams specification.
+   *
+   * The [[AutoCloseable]] resource is closed only once when the upstream or 
downstream finishes or fails.
+   *
+   * Early completion can be done with combination of the [[takeWhile]] 
operator.
+   *
+   * Adheres to the [[ActorAttributes.SupervisionStrategy]] attribute.
+   *
+   * You can configure the default dispatcher for this Source by changing the 
`akka.stream.materializer.blocking-io-dispatcher` or

Review Comment:
   `akka.stream.materializer` should be pekko.stream.materializer`



##########
stream/src/main/scala/org/apache/pekko/stream/javadsl/Source.scala:
##########
@@ -2541,6 +2541,45 @@ final class Source[Out, Mat](delegate: 
scaladsl.Source[Out, Mat]) extends Graph[
         (resource, out) => f(resource, out),
         resource => close.apply(resource).toScala))
 
+  /**
+   * Transform each stream element with the help of a [[AutoCloseable]] 
resource and close it when the stream finishes or fails.
+   *
+   * The resource creation function is invoked once when the stream is 
materialized and the returned resource is passed to
+   * the mapping function for mapping the first element. The mapping function 
returns a mapped element to emit
+   * downstream. The returned `T` MUST NOT be `null` as it is illegal as 
stream element - according to the Reactive Streams specification.
+   *
+   * The [[AutoCloseable]] resource is closed only once when the upstream or 
downstream finishes or fails.
+   *
+   * Early completion can be done with combination of the [[takeWhile]] 
operator.
+   *
+   * Adheres to the [[ActorAttributes.SupervisionStrategy]] attribute.
+   *
+   * You can configure the default dispatcher for this Source by changing the 
`akka.stream.materializer.blocking-io-dispatcher` or

Review Comment:
   `akka.stream.materializer` should be `pekko.stream.materializer`



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