* Removes `Synchronous` from the names and descriptions of File I/O as it leaks impl details
* Removes the factries for FileSource and FileSink and puts them in Source and Sink respectively
main work by @drewhk with contributions from @2m and @rkuhn
This work uncovered many well-hidden bugs in existing Stages, in
particular StatefulStage. These were hidden by the behavior of
OneBoundedInterpreter that normally behaves more orderly than it
guarantees in general, especially with respect to the timeliness of
delivery of upstream termination signals; the bugs were then that
internal state was not flushed when onComplete arrived “too early”.
* also make factories more consistent by only offering
FlowGraph.create()
* also remove secondary (edge-based) FlowGraph.Builder DSL
* also improve naming for conversions from Graph to
Source/Flow/BidiFlow/Sink
* Gives Inlets and Outlets a `carbonCopy` method and switches to allocate them via `apply`
* Removes 4 Array allocations per FanIn and uses a bitmasked array instead
* Makes the FlattenStrategy.concat instance a singleton
These are synchronous implementations, because we need to be Java 6
compatible while developing on 2.3.x. However asynchronous
implementations using AsynchronousFileChannel will come soon for JDK7
users.
+ ActorPublisher/Subscriber now manage stopping of the actor
+ added documentation on configuring dispatcher for File IO
+ properly handle if source file does not exist
+ file sink / source come with default io dispatcher
> verified no actors are leaking
> exceptions are caught and onErrored properly
+ moved files to akka.stream.io
+ Added OutputStreamSink and InputStreamSource
* Not intended to close the ticket, but improve the situation somewhat
by defining default names of all sources and sinks.
* The stage names (actor names) are still rather weird
For example the following
Source.single(1).named("aa")
.map(identity).named("bb")
.map(identity).named("cc")
.runWith(Sink.publisher)
is materilaized with names:
flow-1-0-cc-bb-aa-singleSource : akka.stream.impl.PublisherSource@1787f2a0
flow-1-1-cc-bb-map : Map(<function1>,OperationAttributes(List(Name(map))))
flow-1-2-cc-map : Map(<function1>,OperationAttributes(List(Name(map))))
flow-1-3-publisherSink : PublisherSink
but that is out of scope for this commit
* Remove optional attributes parameter in favor of withAttributes
* Overload explosion when trying to add attributes to ZipWith.
* Aligned with Flow and Source.
* and rename the factory for ActorPublisherSource,
from Source.apply to Source.actorPublisher
* including internal buffer, with OverflowStrategy
* support to complete/fail stream
`abstract class FlattenStrategy` was used in both javadsl and scaladsl, but the concrete concat
for the javadsl was in javadsl.FlattenStrategy and the concrete concat for the scaladsl is in
stream.FlattenStrategy.
Now there are separate FlattenStategy in scaladsl and javadsl packages and conversion
as we have in other places.
* replace JavaConverters with explicit methods
* remove asJava/asScala for FlattenStrategy
* Remove name parameter (no overloads), naming is performed using `.withAttributes` or the new
convenience `.named`. Those adds the OperationAttribute.Name and also change the name of the
shape Inlet and Outlet.
* Remove Source/Sink parameter list for 0 parameter methods,
this allows usage of `Sink.head` instead of `Sink.head()`