Skip to content

Commit

Permalink
=str Make SubFlow and SubSource a final class.
Browse files Browse the repository at this point in the history
  • Loading branch information
He-Pin committed Sep 2, 2023
1 parent 8d2141a commit c8fc7c2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ object SubFlow {
* SubFlows cannot contribute to the super-flow’s materialized value since they
* are materialized later, during the runtime of the flow graph processing.
*/
class SubFlow[In, Out, Mat](
final class SubFlow[In, Out, Mat](
delegate: scaladsl.SubFlow[Out, Mat, scaladsl.Flow[In, Out, Mat]#Repr, scaladsl.Sink[In, Mat]]) {

/** Converts this Flow to its Scala DSL counterpart */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ object SubSource {
* SubFlows cannot contribute to the super-flow’s materialized value since they
* are materialized later, during the runtime of the flow graph processing.
*/
class SubSource[Out, Mat](
final class SubSource[Out, Mat](
delegate: scaladsl.SubFlow[Out, Mat, scaladsl.Source[Out, Mat]#Repr, scaladsl.RunnableGraph[Mat]]) {

/** Converts this Flow to its Scala DSL counterpart */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,20 @@

package org.apache.pekko.stream.scaladsl

import scala.annotation.unchecked.uncheckedVariance
import org.apache.pekko
import pekko.annotation.DoNotInherit
import pekko.stream._

import org.apache.pekko.stream._
import scala.annotation.unchecked.uncheckedVariance

/**
* A “stream of streams” sub-flow of data elements, e.g. produced by `groupBy`.
* SubFlows cannot contribute to the super-flow’s materialized value since they
* are materialized later, during the runtime of the flow graph processing.
*
* Not for user extension
*/
@DoNotInherit
trait SubFlow[+Out, +Mat, +F[+_], C] extends FlowOps[Out, Mat] {

override type Repr[+T] = SubFlow[T, Mat @uncheckedVariance, F @uncheckedVariance, C @uncheckedVariance]
Expand Down

0 comments on commit c8fc7c2

Please sign in to comment.