Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: tidy up implementation of PhasedFusingActorMaterializer #1617

Merged
merged 1 commit into from
Dec 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -869,7 +869,7 @@ private final case class SavedIslandData(
materializer: PhasedFusingActorMaterializer,
islandName: String)
extends PhaseIsland[Publisher[Any]] {
override def name: String = s"SourceModule phase"
override def name: String = "SourceModule phase"

override def materializeAtomic(mod: AtomicModule[Shape, Any], attributes: Attributes): (Publisher[Any], Any) = {
mod
Expand Down Expand Up @@ -899,8 +899,8 @@ private final case class SavedIslandData(
*/
@InternalApi private[pekko] final class SinkModulePhase(materializer: PhasedFusingActorMaterializer, islandName: String)
extends PhaseIsland[AnyRef] {
override def name: String = s"SinkModule phase"
var subscriberOrVirtualPublisher: AnyRef = _
override def name: String = "SinkModule phase"
private var subscriberOrVirtualPublisher: AnyRef = _

override def materializeAtomic(mod: AtomicModule[Shape, Any], attributes: Attributes): (AnyRef, Any) = {
val subAndMat =
Expand Down Expand Up @@ -971,7 +971,7 @@ private final case class SavedIslandData(
extends PhaseIsland[NotUsed] {
def name: String = "TlsModulePhase"

var tlsActor: ActorRef = _
private var tlsActor: ActorRef = _
var publishers: Vector[ActorPublisher[Any]] = _

def materializeAtomic(mod: AtomicModule[Shape, Any], attributes: Attributes): (NotUsed, Any) = {
Expand All @@ -987,7 +987,7 @@ private final case class SavedIslandData(

tlsActor = materializer.actorOf(props, "TLS-for-" + islandName)
def factory(id: Int) = new ActorPublisher[Any](tlsActor) {
override val wakeUpMsg = FanOut.SubstreamSubscribePending(id)
override val wakeUpMsg: FanOut.SubstreamSubscribePending = FanOut.SubstreamSubscribePending(id)
}
publishers = Vector.tabulate(2)(factory)
tlsActor ! FanOut.ExposedPublishers(publishers)
Expand Down
Loading