pekko/akka-stream/src/main/scala/akka/stream/impl/FlowModule.scala
Roland Kuhn b255a19374 simplify materialized value computation tree, fixes #20015
- also fixes materialized value sources for graphs that import zero or
  one graphs, with and without Fusing
2016-03-16 17:05:46 +01:00

24 lines
740 B
Scala

/**
* Copyright (C) 2015-2016 Lightbend Inc. <http://www.lightbend.com>
*/
package akka.stream.impl
import akka.stream._
import akka.stream.impl.StreamLayout.Module
import akka.event.Logging
/**
* INTERNAL API
*/
private[stream] trait FlowModule[In, Out, Mat] extends StreamLayout.AtomicModule {
override def replaceShape(s: Shape) =
if (s != shape) throw new UnsupportedOperationException("cannot replace the shape of a FlowModule")
else this
val inPort = Inlet[In]("Flow.in")
val outPort = Outlet[Out]("Flow.out")
override val shape = new FlowShape(inPort, outPort)
protected def label: String = Logging.simpleName(this)
final override def toString: String = f"$label [${System.identityHashCode(this)}%08x]"
}