many compile fixes and FlowMaterializer

The DSLs MUST NOT rely upon ActorFlowMaterializer, otherwise we cannot
add other materializers later.
This commit is contained in:
Roland Kuhn 2015-02-26 22:42:34 +01:00
parent a4f4cb298a
commit e870c7cbd2
15 changed files with 131 additions and 108 deletions

View file

@ -16,7 +16,7 @@ import org.reactivestreams.Publisher
import scala.collection.immutable
import scala.concurrent.duration.FiniteDuration
import scala.concurrent.{ ExecutionContext, Future }
import akka.stream.{ ActorFlowMaterializer, Graph }
import akka.stream.{ FlowMaterializer, Graph }
import akka.stream.impl._
import akka.actor.Cancellable
import akka.actor.ActorRef
@ -96,7 +96,7 @@ final class Source[+Out, +Mat](private[stream] override val module: Module)
* Connect this `Source` to a `Sink` and run it. The returned value is the materialized value
* of the `Sink`, e.g. the `Publisher` of a [[akka.stream.scaladsl.Sink#publisher]].
*/
def runWith[Mat2](sink: Sink[Out, Mat2])(implicit materializer: ActorFlowMaterializer): Mat2 = toMat(sink)(Keep.right).run()
def runWith[Mat2](sink: Sink[Out, Mat2])(implicit materializer: FlowMaterializer): Mat2 = toMat(sink)(Keep.right).run()
/**
* Shortcut for running this `Source` with a fold function.
@ -106,7 +106,7 @@ final class Source[+Out, +Mat](private[stream] override val module: Module)
* function evaluation when the input stream ends, or completed with `Failure`
* if there is a failure signaled in the stream.
*/
def runFold[U](zero: U)(f: (U, Out) U)(implicit materializer: ActorFlowMaterializer): Future[U] =
def runFold[U](zero: U)(f: (U, Out) U)(implicit materializer: FlowMaterializer): Future[U] =
runWith(Sink.fold(zero)(f))
/**
@ -116,7 +116,7 @@ final class Source[+Out, +Mat](private[stream] override val module: Module)
* normal end of the stream, or completed with `Failure` if there is a failure signaled in
* the stream.
*/
def runForeach(f: Out Unit)(implicit materializer: ActorFlowMaterializer): Future[Unit] = runWith(Sink.foreach(f))
def runForeach(f: Out Unit)(implicit materializer: FlowMaterializer): Future[Unit] = runWith(Sink.foreach(f))
/**
* Concatenates a second source so that the first element