Commit graph

254 commits

Author SHA1 Message Date
Heiko Seeberger
555fe026d0 Reorder Source/FlowWithContext type parameters #26345 2019-02-21 14:24:35 +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
Seeta Ramayya
75713c3469 Missing Java API: Source.empty 2019-01-07 15:02:24 +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
6e21853797 Adding links to wireTap and alsoTo docs (#25808) 2018-11-27 12:08:53 +01:00
kerr
fafc59b19d update headers to regular comment (#25807) 2018-10-29 05:19:37 -04:00
Johan Andrén
1d65159923
Merge pull request #25538 from jchapuis/zipLatest
zipLatest and zipLatestWith operators (refs #25392)
2018-10-03 11:28:43 +02:00
Konrad Malawski
f9911facc0 +str #24812 fix signature of monitor()
* make monitor be a keep.both by default
2018-09-25 09:29:51 +02:00
Jonas Chapuis
a098e0b743 add zipLatest and zipLatestWith operators and graphstages 2018-09-21 09:51:28 +02:00
Kazuhiro Sera
482eaea122 Fix several minor typos detected by github.com/client9/misspell (#25448)
* Fix several minor typos detected by github.com/client9/misspell

* Revert s/erminater/erminator/ in /ActorSystemSpec
2018-08-21 11:02:37 +09:00
Christopher Hunt
5be8d975c4 Add some javadsl Flow methods to Source as well (#25476) 2018-08-20 11:24:14 +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
Jeffrey Chung
72bd3cdfd4 Note in the docs that the zero value for fold and friends must be immutable #24971 2018-06-19 12:33:49 +02:00
Richard S. Imaoka
60eee84345 Replace graph with operator in Scaladoc/Javadoc 2018-06-09 17:42:56 +09:00
Stefano Bonetti
db057df5d9 =str #25091 javadsl ZipWithIndex to return java.lang.Long 2018-05-14 15:22:35 +02:00
Konrad `ktoso` Malawski
7fa28b3488
consistent wording; stream ops are "operators" (#25064) 2018-05-09 16:50:32 +02:00
Konrad `ktoso` Malawski
ca2fe92f0d =str clarify invocation semantics of wireTap, make test less flaky #24979 2018-04-26 14:56:58 +01:00
Konrad `ktoso` Malawski
cceb184098 =str javadoc rewording on new wireTap method 2018-04-25 12:44:47 +09:00
Konrad `ktoso` Malawski
11a397d9c5
+str add in-line wireTap operator for sideeffecting (#24610) 2018-04-25 01:02:31 +09:00
Patrik Nordwall
6f330ef69c automatic throttle burst size, #24699 (#24784)
* automatic throttle burst size, #24699

* throttleEven used maxBurst=Int.MaxValue, which in practise resulted
  in no throttling at all at high rates
* The original problem that throttleEven tried to solve was that when
  the throttle rate (cost / per) was high the cost of scheduling
  dominated and became much lower than the given rate, if 0 or low
  maxBurst was given. Difficult for user to know what maxBurst to use.
* In fact, that was already the case for rates > 30/s.
* This is fixed by automatically adjusting the maxBurst for higher
  throttle rates in a new throttle overload that doesn't include
  maxBurst parameter
* Also skipped the mode parameter for that variant since Shaping is
  what almost always is what you want, and otherwise you can use
  the full signature with a good maxBurst
* Deprecated throttleEven, since it is the same. Also fixed the
  implementation of throttleEven to use the automatic burst size,
  since Int.MaxValue is not useful at all.
2018-04-02 15:07:16 +01:00
mikolak-net
00068e2d1d Extrapolate stage and expand redoc #23804 2018-03-27 10:39:25 +02:00
kerr
e98c77e976 + str Add java.time.Duration to akka-stream's javadsl.* (#24706)
* + str Add java.time.Duration to javadsl.Source

* + str Add java.time.Duration to javadsl.Flow

* + str Add java.time.Duration to javadsl.BidiFlow

* + str Add java.time.Duration to javadsl.RestartSource,RestartFlow and RestartSink

* + str Add java.time.Duration to javadsl.StreamConverters

* + str Add java.time.Duration to javadsl.SubFlow

* + str Add java.time.Duration to javadsl.SubSource

* !stream Deprecate methods which previously accepts Scala's FiniteDuration.
2018-03-19 14:57:26 +09:00
Jimin Hsieh
2c2b8ba001 Remove some of Unused import warning (#24650) 2018-03-16 12:08:29 +01: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
Yan Su
519e6ae546 Add java duration support for Source.tick (Java DSL) #24339 (#24645) 2018-03-05 17:13:15 +01:00
Konrad Malawski
d6000df367 =str add simplified ask(ref) that defaults parallism 2 2018-02-22 19:50:46 +09:00
Konrad Malawski
4714f16dcf +str #18142 ask pattern integration for akka streams
progressed with cleanup, removing the same thread exec context is
weird... causes issues :-/ Need to debug more, could be that some race
also exists in mapAsync then :\

WIP

finish ask impl via watch stage

mima

consistency spec

fix paradox, and fix adding ask/watch to javadsl source

follow up review
2018-02-22 19:50:46 +09: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
虎鸣
e44fafd4b7 + stream add collectType operator to Source,SubSource,Flow and SubFlow for javadsl.
add docs for collectType, do mirror it in scaladsl

mima
2018-02-21 14:23:11 +09:00
jeremystone
e766207a87 alsoTo eager cancellation #24291 2018-02-19 08:31:13 +01:00
Catalin Ursachi
ccf5d46a58 Add wireTap combinator (#15077) (#23824) 2018-02-13 20:39:00 +01:00
Patrik Nordwall
23fa8b0810 change spelling of behaviour to behavior, #24457 2018-02-01 15:10:46 +01:00
Viktor Klang (√)
08b0d34a4c Introduces eager cancellation for divertTo
* and updates Partition to support this behavior
* not adding Partition.apply overload due to type inference issues, use constructor instead
2018-01-30 19:59:53 +01:00
Viktor Klang (√)
e999d03e8b The most common partition-case, as divertTo(Mat) #24388 2018-01-22 19:17:41 +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
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
Alexander Golubev
a7b1a6675b Add throttle combinator without bucket size in parameters (#23808)
* +str Add throttle combinator without bucket size in parameters

* Add mima filter plus comment formatting

* Reviwed throttle messages across all classes

* move mima filter to 2.4.6

* change to throttleEven, plus grammar fixes

* fix formatting

* changed mima filter according to new API

* fixes accoring to feedback
2017-11-17 12:20:12 +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
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