!str #16951 Unify scaladsl and javadsl OperationAttributes

* Move actor specific attributes to ActorOperationAttributes
This commit is contained in:
Patrik Nordwall 2015-04-10 16:49:49 +02:00
parent 4388782af4
commit 00033313e0
55 changed files with 183 additions and 137 deletions

View file

@ -40,6 +40,7 @@ private[akka] case class ActorFlowMaterializerImpl(override val settings: ActorF
override def effectiveSettings(opAttr: OperationAttributes): ActorFlowMaterializerSettings = {
import OperationAttributes._
import ActorOperationAttributes._
opAttr.attributes.foldLeft(settings) { (s, attr)
attr match {
case InputBuffer(initial, max) s.withInputBuffer(initial, max)
@ -57,7 +58,7 @@ private[akka] case class ActorFlowMaterializerImpl(override val settings: ActorF
private val flowName = createFlowName()
private var nextId = 0
private def stageName(attr: OperationAttributes): String = {
val name = s"$flowName-$nextId-${attr.name}"
val name = s"$flowName-$nextId-${attr.nameOrDefault()}"
nextId += 1
name
}
@ -66,7 +67,6 @@ private[akka] case class ActorFlowMaterializerImpl(override val settings: ActorF
def newMaterializationContext() = new MaterializationContext(ActorFlowMaterializerImpl.this,
effectiveAttributes, stageName(effectiveAttributes))
atomic match {
case sink: SinkModule[_, _]
val (sub, mat) = sink.create(newMaterializationContext())