!str #19037 rename FlowGraph to GraphDSL

This commit is contained in:
Roland Kuhn 2015-11-30 15:45:37 +01:00
parent 5895834d98
commit f00da4daac
92 changed files with 535 additions and 542 deletions

View file

@ -76,8 +76,8 @@ private[http] object OutgoingConnectionBlueprint {
case (MessageStartError(_, info), _) throw IllegalResponseException(info)
}
val core = BidiFlow.fromGraph(FlowGraph.create() { implicit b
import FlowGraph.Implicits._
val core = BidiFlow.fromGraph(GraphDSL.create() { implicit b
import GraphDSL.Implicits._
val methodBypassFanout = b.add(Broadcast[HttpRequest](2, eagerCancel = true))
val responseParsingMerge = b.add(new ResponseParsingMerge(rootParser))

View file

@ -65,8 +65,8 @@ private object PoolConductor {
*/
def apply(slotCount: Int, pipeliningLimit: Int, log: LoggingAdapter): Graph[Ports, Any] =
FlowGraph.create() { implicit b
import FlowGraph.Implicits._
GraphDSL.create() { implicit b
import GraphDSL.Implicits._
val retryMerge = b.add(MergePreferred[RequestContext](1, eagerClose = true))
val slotSelector = b.add(new SlotSelector(slotCount, pipeliningLimit, log))

View file

@ -70,9 +70,9 @@ private object PoolFlow {
def apply(connectionFlow: Flow[HttpRequest, HttpResponse, Future[Http.OutgoingConnection]],
remoteAddress: InetSocketAddress, settings: ConnectionPoolSettings, log: LoggingAdapter)(
implicit system: ActorSystem, fm: Materializer): Flow[RequestContext, ResponseContext, Unit] =
Flow.fromGraph(FlowGraph.create[FlowShape[RequestContext, ResponseContext]]() { implicit b
Flow.fromGraph(GraphDSL.create[FlowShape[RequestContext, ResponseContext]]() { implicit b
import settings._
import FlowGraph.Implicits._
import GraphDSL.Implicits._
val conductor = b.add(PoolConductor(maxConnections, pipeliningLimit, log))
val slots = Vector

View file

@ -55,8 +55,8 @@ private object PoolSlot {
remoteAddress: InetSocketAddress, // TODO: remove after #16168 is cleared
settings: ConnectionPoolSettings)(implicit system: ActorSystem,
fm: Materializer): Graph[FanOutShape2[RequestContext, ResponseContext, RawSlotEvent], Any] =
FlowGraph.create() { implicit b
import FlowGraph.Implicits._
GraphDSL.create() { implicit b
import GraphDSL.Implicits._
// TODO wouldn't be better to have them under a known parent? /user/SlotProcessor-0 seems weird
val name = slotProcessorActorName.next()

View file

@ -32,9 +32,9 @@ private object RenderSupport {
val defaultLastChunkBytes: ByteString = renderChunk(HttpEntity.LastChunk)
def CancelSecond[T, Mat](first: Source[T, Mat], second: Source[T, Any]): Source[T, Mat] = {
Source.fromGraph(FlowGraph.create(first) { implicit b
Source.fromGraph(GraphDSL.create(first) { implicit b
frst
import FlowGraph.Implicits._
import GraphDSL.Implicits._
second ~> Sink.cancelled
SourceShape(frst.outlet)
})

View file

@ -66,8 +66,8 @@ private[http] object HttpServerBluePrint {
def websocketSupport(settings: ServerSettings, log: LoggingAdapter)(implicit mat: Materializer): BidiFlow[ResponseRenderingOutput, ByteString, ByteString, ByteString, Unit] = {
val ws = websocketSetup
BidiFlow.fromGraph(FlowGraph.create() { implicit b
import FlowGraph.Implicits._
BidiFlow.fromGraph(GraphDSL.create() { implicit b
import GraphDSL.Implicits._
val switch = b.add(new ProtocolSwitchStage(ws.installHandler, settings.websocketRandomFactory, log))

View file

@ -121,8 +121,8 @@ private[http] object Websocket {
MessageToFrameRenderer.create(serverSide)
.named("ws-render-messages")
BidiFlow.fromGraph(FlowGraph.create() { implicit b
import FlowGraph.Implicits._
BidiFlow.fromGraph(GraphDSL.create() { implicit b
import GraphDSL.Implicits._
val split = b.add(BypassRouter)
val tick = Source.tick(closeTimeout, closeTimeout, Tick)

View file

@ -109,8 +109,8 @@ object WebsocketClientBlueprint {
}
}
BidiFlow.fromGraph(FlowGraph.create() { implicit b
import FlowGraph.Implicits._
BidiFlow.fromGraph(GraphDSL.create() { implicit b
import GraphDSL.Implicits._
val networkIn = b.add(Flow[ByteString].transform(() new UpgradeStage))
val wsIn = b.add(Flow[ByteString])

View file

@ -44,8 +44,8 @@ class HighLevelOutgoingConnectionSpec extends AkkaSpec {
val connFlow = Http().outgoingConnection(serverHostName, serverPort)
val C = 4
val doubleConnection = Flow.fromGraph(FlowGraph.create() { implicit b
import FlowGraph.Implicits._
val doubleConnection = Flow.fromGraph(GraphDSL.create() { implicit b
import GraphDSL.Implicits._
val bcast = b.add(Broadcast[HttpRequest](C))
val merge = b.add(Merge[HttpResponse](C))

View file

@ -526,9 +526,9 @@ class LowLevelOutgoingConnectionSpec extends AkkaSpec("akka.loggers = []\n akka.
val netOut = TestSubscriber.manualProbe[ByteString]
val netIn = TestPublisher.manualProbe[ByteString]()
RunnableGraph.fromGraph(FlowGraph.create(OutgoingConnectionBlueprint(Host("example.com"), settings, NoLogging)) { implicit b
RunnableGraph.fromGraph(GraphDSL.create(OutgoingConnectionBlueprint(Host("example.com"), settings, NoLogging)) { implicit b
client
import FlowGraph.Implicits._
import GraphDSL.Implicits._
Source(netIn) ~> Flow[ByteString].map(SessionBytes(null, _)) ~> client.in2
client.out1 ~> Flow[SslTlsOutbound].collect { case SendBytes(x) x } ~> Sink(netOut)
Source(requests) ~> client.in1

View file

@ -34,9 +34,9 @@ abstract class HttpServerTestSetupBase {
val netIn = TestPublisher.probe[ByteString]()
val netOut = ByteStringSinkProbe()
RunnableGraph.fromGraph(FlowGraph.create(HttpServerBluePrint(settings, remoteAddress = remoteAddress, log = NoLogging)) { implicit b
RunnableGraph.fromGraph(GraphDSL.create(HttpServerBluePrint(settings, remoteAddress = remoteAddress, log = NoLogging)) { implicit b
server
import FlowGraph.Implicits._
import GraphDSL.Implicits._
Source(netIn) ~> Flow[ByteString].map(SessionBytes(null, _)) ~> server.in2
server.out1 ~> Flow[SslTlsOutbound].collect { case SendBytes(x) x } ~> netOut.sink
server.out2 ~> Sink(requests)

View file

@ -822,7 +822,7 @@ class MessageSpec extends FreeSpec with Matchers with WithMaterializerSpec {
val messageHandler: Flow[Message, Message, Unit] =
Flow.fromGraph {
FlowGraph.create() { implicit b
GraphDSL.create() { implicit b
val in = b.add(Sink(messageIn)).inlet
val out = b.add(Source(messageOut)).outlet

View file

@ -312,9 +312,9 @@ class WebsocketClientSpec extends FreeSpec with Matchers with WithMaterializerSp
val netIn = TestPublisher.probe[ByteString]()
val graph =
RunnableGraph.fromGraph(FlowGraph.create(clientLayer) { implicit b
RunnableGraph.fromGraph(GraphDSL.create(clientLayer) { implicit b
client
import FlowGraph.Implicits._
import GraphDSL.Implicits._
Source(netIn) ~> Flow[ByteString].map(SessionBytes(null, _)) ~> client.in2
client.out1 ~> Flow[SslTlsOutbound].collect { case SendBytes(x) x } ~> netOut.sink
client.out2 ~> clientImplementation ~> client.in1