Commit graph

176 commits

Author SHA1 Message Date
Martynas Mickevičius
18d970fc8e Add setup operator #26192 2019-05-17 08:54:18 +02:00
Stefano Bonetti
1ad174cf8c =str #25045 adding Java/Scala interop to SourceQueue and SinkQueue
adding MiMa filters

preserving binary compat
2019-04-15 11:42:06 +02:00
Nicolas Vollmar
c9b3f1de6d GrapheStage implementation for actorRef source (#25324) (#26054)
* Adds internal access to materializer before initialization (#25324)

* Implements new actorRef source based on graph stage  (#25324)

* Removes obsolete actorRef source (#25324)

* Improves backwards compatibility with old implementation (#25324)

* Removes dedicated new subclass for materializer access again  (#25324)

* Improves implementation (#25324)

* Finalizes implementation (#25324)

* Small improvements to API and documentation (#25324)

* Completion strategy as a replacement for poison pill (#25324)

* Adding more tests and updating the documentation (#25324)
2019-03-27 14:16:38 +01:00
Auto Format
75579bed17 format source with scalafmt, #26511 2019-03-15 10:23:46 +01:00
Auto Format
ce404e4f53 format source with scalafmt 2019-03-11 16:58:55 +01:00
Patrik Nordwall
5c96a5f556 replace unicode arrows
* ⇒, →, ←
* because we don't want to show them in documentation snippets and
  then it's complicated to avoid that when snippets are
  located in src/test/scala in individual modules
* dont replace object `→` in FSM.scala and PersistentFSM.scala
2019-03-11 16:58:51 +01:00
Luc Bourlier
5a425c1dc7 Rename start/endContextPropagation functions to asFlow/Source.. (#26353)
To match FlowWithContext.asFlow
2019-03-04 15:48:24 +01:00
Heiko Seeberger
555fe026d0 Reorder Source/FlowWithContext type parameters #26345 2019-02-21 14:24:35 +01:00
Martynas Mickevičius
d6ae3f1da9 Add asJava/asScala to RunnableGraph #26245 2019-02-07 15:41:49 +01:00
Patrik Nordwall
a920349090
Merge pull request #25951 from RayRoestenburg/wip-context-operators
SourceWithContext and FlowWithContext
2019-01-18 17:27:10 +01:00
Johannes Rudolph
a2c811d75a Cleanup, improvements, simplicification, scaladoc and javadoc of SourceWithContext and FlowWithContext 2019-01-18 15:54:43 +01:00
Raymond Roestenburg
d76d259408 Initial SourceWithContext, FlowWithContext, FlowWithContextOps.
(based on https://github.com/akka/akka/compare/master...jrudolph:jr/withContextOps)
2019-01-18 15:54:13 +01:00
Arnout Engelen
5664f4ae88 clarify watchCompletion only watches the stage, not the stream (#26224)
* clarify watchCompletion only watches the stage, not the stream

* stage->operator
2019-01-13 18:23:15 +01:00
kerr
bdc90052aa Update headers from 2018 to 2019 once for all. (#26165)
* Add CopyrightHeader support for sbt-boilerplate plugin.
* Add CopyrightHeader support for `*.proto` files.
* Add regex match for both `–` and `-` for CopyrightHeader.
* Add CopyrightHeader support for sbt build files.
* Update copyright from 2018 to 2019.
2019-01-02 11:55:26 +01:00
Nicolas Vollmar
8b8c7355bf Adding loglevel for overflow strategy #25949 (#25976)
* Adding loglevel for overflow strategy (#25949)

* Simplifying overflow strategy api (#25949)

* Adding overflow strategy check for backpressu (#25949)

* Adding log statements to all stages with overflow strategy (#25949)

* Adding excludes for internal api changes (#25949)

* Adding internal api annotations (#25949)

* Adding log source overrides for better logger names (#25949)

* Moving mima excludes for 2.5.18 (#25949)
2018-12-05 13:31:43 +00:00
kerr
e9fb3a020a Make use of scalafix to remove unused import. (#26019)
* =build Add scalafix to remote unused import.

* +build Add file ignore plugin for scalafix which support ignore files.
2018-12-05 08:30:21 +00:00
kerr
fafc59b19d update headers to regular comment (#25807) 2018-10-29 05:19:37 -04:00
Patrik Nordwall
d76b27ba3e
Optimize flatMapConcat for single element source, #25241 (#25242)
* Optimize flatMapConcat for single element source, #25241

* Grab the SourceSingle via TraversalBuilder

* Also handle the case when there is no demand

* don't match when mapMaterializedValue and async
2018-07-11 18:19:40 +02:00
Rob Moore
ce185c4dfc Source.actorRef not completing on Success (#25285)
When a Success is received, call onCompleteThenStop instead of just
context.stop; that takes care of the completion logic instead of just
stopping the actor and leaving the stream going.

Add test to ensure the stream materializes on Source.actorRef receiving
Status.Success

Remove tests around stream completion behaviour in response to
PoisonPill - as well as these tests not correctly demonstrating that the
completion was passed on downstream, they describe behaviour which was
previously incidental and is no longer accurate.

Update the docs to reflect that PoisonPill should not be used on the
actor ref as this scenario will necessarily result in bad behaviour as
it will be unable to signal the completion downstream.

Make a few grammar fixes and remove some trailing space while updating the
docs.
2018-07-09 22:25:32 +01:00
Richard S. Imaoka
60eee84345 Replace graph with operator in Scaladoc/Javadoc 2018-06-09 17:42:56 +09:00
Christopher Hunt
e744e583e5 Capture the Success companion object as well as its class (#24747)
The absence of this is something that caught me out, and others.
2018-03-19 11:06:53 +09:00
Johan Andrén
d8b9bb1b3a
Java Flow dsl lower bounds incorrect #24368 2018-03-15 14:53:50 +01:00
Konrad `ktoso` Malawski
563c7fbcf0 Issue 24594: Integration with sbt-headers and initial header population 2018-03-13 15:45:55 +01:00
Roman Filonenko
0ecadf7235 deduplicate logic for IODispatcher #24604 (#24619)
* deduplicate logic for IODispatcher #24604
 * introduce a resolveDispatcher helper in ActorAttributes
 * mention akka.stream.materializer.blocking-io-dispatcher instead of akka.stream.blocking-io-dispatcher in scaladocs
 * fix a flaky test
 * cosmetic changes in the touched files

* move resolveDispather helper to the Dispatcher companion object under a new name resolve

* filter out mima warning

* fix mima excludes after the 2.5.11 release

* address review comments
 * update stream-io.md with the correct dispatcher config key
 * mark ActorAttributes.Dispatcher#resolve as internal API
 * use the dispatche config key in ActorMaterializer

* add private[akka] to the resolve methods
2018-03-07 15:12:34 +01:00
Oleksii Tkachuk
80da4cadee Issue 24519: Created method lazilyAsync for both DSLs and adds section in docs (#24568)
* Issue 24519: Created method lazilyAsync for both DSLs and adds section in docs.

* Issue 24519: Changes according to code review

* Issue 24519: Added unit tests

* Update LazilyAsyncSpec.scala

* Issue 24519: Added copyright
2018-02-22 10:15:25 +09:00
Stefano Bonetti
3ea59b1e76 Adding preMaterialize operator for Source #23894 (#24497) 2018-02-21 15:06:01 +09:00
Martynas Mickevičius
cbe0215c41 Typed stream adapters, #23604
* Change more general factories to private
* Typed Streams docs
* Remove BoxedUnit from Java Api
* Use JavaPartialFunction in Java examples
* Doc wording improvements, formatting fixes, no verification diagrams
2018-01-31 15:33:48 +01:00
Konrad `ktoso` Malawski
171bb6c231 WIP initial typed streams adapters
Adapt ref source and sink for typed

 * do not use the typed teskit temporarily
2018-01-31 15:10:46 +01:00
Konrad Malawski
6264f8ea70 +str #24229 back to Future[] API for stream refs
nitpicks
2018-01-23 02:27:10 +09:00
Konrad Malawski
c5a2785c7c +str #24229 implement flattening of mat values, may block; SHOULD BE INTERNAL API
add java documentation

images
2018-01-23 02:27:10 +09:00
Konrad `ktoso` Malawski
7c75abbf7e +str #24229 move SinkRef / SourceRef to akka.stream
+str #24229 remove protobuf changes, which do not need to be made in this PR

docs

moved things

config object

subscription timeout confifmed working, also, attributes

document attributes for sub timeout

tests for the source also failing when it should

additional demand test

implemented protection from materializing "in cycles"; would be nice in
types but that breaks the niceness of use of the types
SinkRef/SourceRef...

cleanup

no idle timeout built in, can use the Timeout stages

more docs

simplest change to prevent exposing SinkRef => SourceRef => SinkRef cycle

Things to decide:
 * is it ok to require using `getSource` / `getSink` as Java API, is there better naming?
 * where should the constructors go? I'd say just in regular javadsl/scaladsl `Source`/ `Sink` objects

move constructors to {javadsl,scaladsl}.{Source,Sink} companion objects

Remove now useless "canMaterialize" field

Separate stage (implementation) from ref (wrapped actor ref) to make it clearer what is serialized

Clarify that partner refs are not optional in on-the-wire interfaces

minor cleanup in SourceRefStage

Renamed the stages but questionable if that really helps ;)

cleanups, better docs

cleanup, fix docs compilation

fix mima

got rid of Futures in the materialized values of stream refs
2018-01-23 02:27:10 +09:00
Johan Andrén
4dde0742d0 Untangle settings from attributes in materializer #24063
Instead of renaming - deprecating and documenting

Renaming defaultInitialAttributes to defaultAttributes and adding docs

Tests passing

More work on using attributes for the attribute settings in ActorMaterializerSettings

Mark some attributes as mandatory and provide a smoother access w/o allocation for those

Another warning notice

MiMa filters

Part of the review adressed

Incorrect rebase fixed + formatting

Review feedback adressed

Formatting ...
2018-01-11 14:14:38 +09:00
Christopher Batey
009214ae07
Update copyright to 2018 (#24241) 2018-01-04 17:26:29 +00:00
Johan Andrén
1751292580
Attributes on fromGraph(stage) should be treated as on stage #22911, #22523 2017-11-23 10:26:00 +01:00
Johan Andrén
6db974b6f4 No submaterializing inner source when outer stream already canceled (#23723)
* Do not try to submaterialize inner source when outer stream already cancelled #23656

* Use StreamDetachedException

* Sleep a little

* Updated exception text
2017-11-17 12:24:12 +01:00
Richard Imaoka
ad5fa124b3 Fix a bug in viaMat for Identity flow optimization #22899 2017-11-13 09:21:46 +01:00
Richard Imaoka
a50df1c575 Add combinedMat method to Source (#23809)
* Add combinedMat method to Source

* Fix formatting
2017-11-02 10:34:40 +09:00
Nadav Wiener
54d408b1c5 deprecate Source.combine instance method #22452 2017-09-18 08:48:57 +02:00
Johan Andrén
407131cb4e Stream supervision doc clarification #23376 2017-07-26 16:23:46 +02:00
James Roper
c60d20af32 Restart Flow/Source/Sink #19950 2017-07-20 15:02:34 +02:00
Johan Andrén
2b2923f1b6 MaybeSource rewritten as GraphStage #22789 2017-07-05 12:55:28 +01:00
Heiko Seeberger
b929565323 Fix docs for Source.queue (closes #23081) 2017-06-02 10:40:54 +02:00
Hawstein
b3d00afdd1 Move ConstantFun to akka.util, #22813 2017-05-10 18:00:42 +02:00
cchantep
5b542d99fa Flatten a Future[Graph[SourceShape[T], M]] as Source[T, Future[M]] #22359 2017-03-14 12:54:01 +01:00
Patrik Nordwall
3554ad7243 Merge branch 'master' into wip-traversal-oriented-layout-master-patriknw 2017-03-10 18:16:44 +01:00
Patrik Nordwall
6c8e24cefa fix SinkSpec, and async boundary attribute, #22463
* let's keep the AsyncBoundary attribute for now,
  makeIsland is done in setAttributes
* fixing SinkSpec and RunnableGraphSpec
2017-03-08 15:09:40 +01:00
Patrik Nordwall
1a74b43cd6 include initialAttributes of GraphStage, #22463
* these must also be included via setAttributes because
  because it will create island for async (dispatcher attribute)
* better actor name of GraphStageIsland, we need it in tests for
  lookup of the actor
* this unlocks OutputStreamSourceSpec and InputStreamSinkSpec
2017-03-08 13:15:49 +01:00
Konrad `ktoso` Malawski
e47dbda154 =str #22448 rewrite Source.empty to GraphStage 2017-03-07 15:13:49 +01:00
drewhk
46b869d041 Fix the case where an identity flow is appended to a Source with materialized value composition (#22442) 2017-03-02 13:44:35 +01:00
Endre Sándor Varga
ba63c7af8d New materializer and layout 2017-03-01 16:18:55 +01:00