=str #16957 Refactor actor creation api for sinks and sources
* also solves #16952, dispatcher for ActorPublisher
This commit is contained in:
parent
386ff80a0e
commit
4fcd3d0392
7 changed files with 149 additions and 67 deletions
|
|
@ -14,6 +14,7 @@ import akka.actor.Props
|
|||
import akka.actor.ActorRef
|
||||
import akka.stream.javadsl.japi
|
||||
import scala.concurrent.ExecutionContextExecutor
|
||||
import akka.stream.scaladsl.OperationAttributes
|
||||
|
||||
object ActorFlowMaterializer {
|
||||
|
||||
|
|
@ -121,6 +122,16 @@ object ActorFlowMaterializer {
|
|||
system
|
||||
}
|
||||
|
||||
/**
|
||||
* INTERNAL API
|
||||
*/
|
||||
private[akka] def downcast(materializer: FlowMaterializer): ActorFlowMaterializer =
|
||||
materializer match {
|
||||
case m: ActorFlowMaterializer ⇒ m
|
||||
case _ ⇒ throw new IllegalArgumentException(s"required [${classOf[ActorFlowMaterializer].getName}] " +
|
||||
s"but got [${materializer.getClass.getName}]")
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -134,10 +145,12 @@ abstract class ActorFlowMaterializer extends FlowMaterializer {
|
|||
|
||||
def settings: ActorFlowMaterializerSettings
|
||||
|
||||
def effectiveSettings(opAttr: OperationAttributes): ActorFlowMaterializerSettings
|
||||
|
||||
/**
|
||||
* INTERNAL API
|
||||
* INTERNAL API: this might become public later
|
||||
*/
|
||||
private[akka] def actorOf(props: Props, name: String): ActorRef
|
||||
private[akka] def actorOf(context: MaterializationContext, props: Props): ActorRef
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue