Materializer settings as attributes (#27499)

* Replace MaterializerSettings with Attributes #25559 
 * Field access to settings deprecated to make stages use attributes instead
 * Internal stages updated to use attributes
 * Docs on ActorMaterializerSettings updated to recommend away from using it
 * Verify all stages stopped after each testcase in FlowGroupBySpec
 * Subscription timeout attributes merged into one
This commit is contained in:
Johan Andrén 2019-09-04 13:37:06 +02:00 committed by GitHub
parent b9a879d722
commit aca63ea198
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
132 changed files with 1596 additions and 1116 deletions

View file

@ -907,7 +907,7 @@ private[stream] object Collect {
new GraphStageLogic(shape) with InHandler with OutHandler with StageLogging {
override protected def logSource: Class[_] = classOf[Buffer[_]]
private var buffer: BufferImpl[T] = _
private val buffer: BufferImpl[T] = BufferImpl(size, inheritedAttributes)
val enqueueAction: T => Unit =
overflowStrategy match {
@ -966,7 +966,6 @@ private[stream] object Collect {
}
override def preStart(): Unit = {
buffer = BufferImpl(size, materializer)
pull(in)
}
@ -1253,7 +1252,7 @@ private[stream] object Collect {
}
})
override def preStart(): Unit = buffer = BufferImpl(parallelism, materializer)
override def preStart(): Unit = buffer = BufferImpl(parallelism, inheritedAttributes)
override def onPull(): Unit = pushNextIfPossible()
@ -1348,7 +1347,7 @@ private[stream] object Collect {
private[this] def todo = inFlight + buffer.used
override def preStart(): Unit = buffer = BufferImpl(parallelism, materializer)
override def preStart(): Unit = buffer = BufferImpl(parallelism, inheritedAttributes)
def futureCompleted(result: Try[Out]): Unit = {
inFlight -= 1
@ -1727,7 +1726,7 @@ private[stream] object Collect {
var buffer: BufferImpl[(Long, T)] = _ // buffer has pairs timestamp with upstream element
override def preStart(): Unit = buffer = BufferImpl(size, materializer)
override def preStart(): Unit = buffer = BufferImpl(size, inheritedAttributes)
val onPushWhenBufferFull: () => Unit = strategy match {
case EmitEarly =>