New materializer and layout

This commit is contained in:
Endre Sándor Varga 2016-07-27 13:29:23 +02:00 committed by Endre Sándor Varga
parent 1989ef481d
commit ba63c7af8d
60 changed files with 4420 additions and 3181 deletions

View file

@ -3,7 +3,8 @@
*/
package akka.stream
import akka.stream.impl.StreamLayout
import akka.stream.impl.TraversalBuilder
import scala.annotation.unchecked.uncheckedVariance
trait Graph[+S <: Shape, +M] {
@ -20,7 +21,7 @@ trait Graph[+S <: Shape, +M] {
*
* Every materializable element must be backed by a stream layout module
*/
private[stream] def module: StreamLayout.Module
private[stream] def traversalBuilder: TraversalBuilder
def withAttributes(attr: Attributes): Graph[S, M]
@ -29,7 +30,8 @@ trait Graph[+S <: Shape, +M] {
/**
* Put an asynchronous boundary around this `Graph`
*/
// TODO: no longer encoded as attributes!!!!
def async: Graph[S, M] = addAttributes(Attributes.asyncBoundary)
def addAttributes(attr: Attributes): Graph[S, M] = withAttributes(module.attributes and attr)
def addAttributes(attr: Attributes): Graph[S, M] = withAttributes(traversalBuilder.attributes and attr)
}