Rename OperationAttributes to Attributes
This commit is contained in:
parent
e6f2db127c
commit
dc7269e620
92 changed files with 458 additions and 462 deletions
|
|
@ -51,10 +51,10 @@ private[akka] case class ActorFlowMaterializerImpl(
|
|||
|
||||
private[this] def createFlowName(): String = s"$namePrefix-${nextFlowNameCount()}"
|
||||
|
||||
override def effectiveSettings(opAttr: OperationAttributes): ActorFlowMaterializerSettings = {
|
||||
import OperationAttributes._
|
||||
import ActorOperationAttributes._
|
||||
opAttr.attributes.foldLeft(settings) { (s, attr) ⇒
|
||||
override def effectiveSettings(opAttr: Attributes): ActorFlowMaterializerSettings = {
|
||||
import Attributes._
|
||||
import ActorAttributes._
|
||||
opAttr.attributeList.foldLeft(settings) { (s, attr) ⇒
|
||||
attr match {
|
||||
case InputBuffer(initial, max) ⇒ s.withInputBuffer(initial, max)
|
||||
case Dispatcher(dispatcher) ⇒ s.withDispatcher(dispatcher)
|
||||
|
|
@ -73,13 +73,13 @@ private[akka] case class ActorFlowMaterializerImpl(
|
|||
val session = new MaterializerSession(runnableFlow.module) {
|
||||
private val flowName = createFlowName()
|
||||
private var nextId = 0
|
||||
private def stageName(attr: OperationAttributes): String = {
|
||||
private def stageName(attr: Attributes): String = {
|
||||
val name = s"$flowName-$nextId-${attr.nameOrDefault()}"
|
||||
nextId += 1
|
||||
name
|
||||
}
|
||||
|
||||
override protected def materializeAtomic(atomic: Module, effectiveAttributes: OperationAttributes): Any = {
|
||||
override protected def materializeAtomic(atomic: Module, effectiveAttributes: Attributes): Any = {
|
||||
|
||||
def newMaterializationContext() = new MaterializationContext(ActorFlowMaterializerImpl.this,
|
||||
effectiveAttributes, stageName(effectiveAttributes))
|
||||
|
|
@ -120,7 +120,7 @@ private[akka] case class ActorFlowMaterializerImpl(
|
|||
}
|
||||
|
||||
private def processorFor(op: StageModule,
|
||||
effectiveAttributes: OperationAttributes,
|
||||
effectiveAttributes: Attributes,
|
||||
effectiveSettings: ActorFlowMaterializerSettings): (Processor[Any, Any], Any) = op match {
|
||||
case DirectProcessor(processorFactory, _) ⇒ processorFactory()
|
||||
case Identity(attr) ⇒ (new VirtualProcessor, ())
|
||||
|
|
@ -134,7 +134,7 @@ private[akka] case class ActorFlowMaterializerImpl(
|
|||
}
|
||||
|
||||
private def materializeJunction(op: JunctionModule,
|
||||
effectiveAttributes: OperationAttributes,
|
||||
effectiveAttributes: Attributes,
|
||||
effectiveSettings: ActorFlowMaterializerSettings): Unit = {
|
||||
op match {
|
||||
case fanin: FanInModule ⇒
|
||||
|
|
@ -294,7 +294,7 @@ private[akka] object ActorProcessorFactory {
|
|||
|
||||
private val _identity = (x: Any) ⇒ x
|
||||
|
||||
def props(materializer: ActorFlowMaterializer, op: StageModule, parentAttributes: OperationAttributes): (Props, Any) = {
|
||||
def props(materializer: ActorFlowMaterializer, op: StageModule, parentAttributes: Attributes): (Props, Any) = {
|
||||
val att = parentAttributes and op.attributes
|
||||
// USE THIS TO AVOID CLOSING OVER THE MATERIALIZER BELOW
|
||||
// Also, otherwise the attributes will not affect the settings properly!
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue