Deprecate actor materializer (#27538)
This commit is contained in:
parent
8765a4fbe6
commit
b68d67008a
118 changed files with 1233 additions and 731 deletions
|
|
@ -8,21 +8,39 @@ import java.util
|
|||
import java.util.concurrent.atomic.AtomicBoolean
|
||||
|
||||
import akka.NotUsed
|
||||
import akka.actor.{ ActorContext, ActorRef, ActorRefFactory, ActorSystem, Cancellable, ExtendedActorSystem, PoisonPill }
|
||||
import akka.annotation.{ DoNotInherit, InternalApi, InternalStableApi }
|
||||
import akka.actor.ActorContext
|
||||
import akka.actor.ActorRef
|
||||
import akka.actor.ActorRefFactory
|
||||
import akka.actor.ActorSystem
|
||||
import akka.actor.Cancellable
|
||||
import akka.actor.ExtendedActorSystem
|
||||
import akka.actor.PoisonPill
|
||||
import akka.actor.Props
|
||||
import akka.annotation.DoNotInherit
|
||||
import akka.annotation.InternalApi
|
||||
import akka.annotation.InternalStableApi
|
||||
import akka.dispatch.Dispatchers
|
||||
import akka.event.{ Logging, LoggingAdapter }
|
||||
import akka.event.Logging
|
||||
import akka.event.LoggingAdapter
|
||||
import akka.stream.Attributes.InputBuffer
|
||||
import akka.stream._
|
||||
import akka.stream.impl.StreamLayout.AtomicModule
|
||||
import akka.stream.impl.fusing.ActorGraphInterpreter.{ ActorOutputBoundary, BatchingActorInputBoundary }
|
||||
import akka.stream.impl.fusing.ActorGraphInterpreter.ActorOutputBoundary
|
||||
import akka.stream.impl.fusing.ActorGraphInterpreter.BatchingActorInputBoundary
|
||||
import akka.stream.impl.fusing.GraphInterpreter.Connection
|
||||
import akka.stream.impl.fusing._
|
||||
import akka.stream.impl.io.{ TLSActor, TlsModule }
|
||||
import akka.stream.stage.{ GraphStageLogic, InHandler, OutHandler }
|
||||
import org.reactivestreams.{ Processor, Publisher, Subscriber }
|
||||
import akka.stream.impl.io.TLSActor
|
||||
import akka.stream.impl.io.TlsModule
|
||||
import akka.stream.stage.GraphStageLogic
|
||||
import akka.stream.stage.InHandler
|
||||
import akka.stream.stage.OutHandler
|
||||
import akka.util.OptionVal
|
||||
import org.reactivestreams.Processor
|
||||
import org.reactivestreams.Publisher
|
||||
import org.reactivestreams.Subscriber
|
||||
|
||||
import scala.collection.immutable.Map
|
||||
import scala.concurrent.ExecutionContextExecutor
|
||||
import scala.concurrent.duration.FiniteDuration
|
||||
import scala.concurrent.ExecutionContextExecutor
|
||||
import akka.util.OptionVal
|
||||
|
|
@ -81,7 +99,7 @@ import com.github.ghik.silencer.silent
|
|||
GraphStageTag -> DefaultPhase)
|
||||
|
||||
@silent("deprecated")
|
||||
@InternalApi private[akka] def apply()(implicit context: ActorRefFactory): ActorMaterializer = {
|
||||
@InternalApi private[akka] def apply()(implicit context: ActorRefFactory): Materializer = {
|
||||
val haveShutDown = new AtomicBoolean(false)
|
||||
val system = actorSystemOf(context)
|
||||
val materializerSettings = ActorMaterializerSettings(system)
|
||||
|
|
@ -600,6 +618,24 @@ private final case class SavedIslandData(
|
|||
override def makeLogger(logSource: Class[_]): LoggingAdapter =
|
||||
Logging(system, logSource)
|
||||
|
||||
/**
|
||||
* INTERNAL API
|
||||
*/
|
||||
@silent("deprecated")
|
||||
@InternalApi private[akka] override def actorOf(context: MaterializationContext, props: Props): ActorRef = {
|
||||
val effectiveProps = props.dispatcher match {
|
||||
case Dispatchers.DefaultDispatcherId =>
|
||||
props.withDispatcher(context.effectiveAttributes.mandatoryAttribute[ActorAttributes.Dispatcher].dispatcher)
|
||||
case ActorAttributes.IODispatcher.dispatcher =>
|
||||
// this one is actually not a dispatcher but a relative config key pointing containing the actual dispatcher name
|
||||
// FIXME go via attributes here,or something
|
||||
props.withDispatcher(settings.blockingIoDispatcher)
|
||||
case _ => props
|
||||
}
|
||||
|
||||
actorOf(effectiveProps, context.islandName)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue