Commit graph

1193 commits

Author SHA1 Message Date
drewhk
e0a062dd72 #21833: Fix race in BroadcastHub shutdown and new registrations 2016-11-18 10:23:43 +01:00
Hawstein
c373cef20f use SimpleLinearGraphStage to reduce the boilerplate code #21830 2016-11-18 10:13:15 +01:00
Olli Helenius
658b46e1cc Move (de)compression helpers to akka-stream module #21395 (#21409)
* Move (de)compression helpers to akka-stream #21395

* Move compression and decompression -related classes from
  akka-http-experimental to akka-stream
* Add Compression helper object with functions to create
  decompressing Flows
* Add a short cookbook entry

* =str move compression impl classes into their own directory (and change visibility)

* =str also expose gzip/deflate compression flows

* Fix formatting of plural ByteStrings in cookbook

* =str #21395 make compressor call Deflater.end in postStop to release resources

Also simplified the creation of the flow given a compressor.

* =str #21395 decompressors call Inflater.end in postStop to release resources

* =str #21395 smallish Scaladoc fixes
2016-11-17 22:42:37 +01:00
Johannes Rudolph
b4cfc3717f =str #21753 simplify TLSActor configuration by allowing to specify SSLEngine directly (#21822)
Do all (Akka)SSLConfig magic in one place directly in the TLS API.

Also, introduce new low-level entrypoint in TLS that allows to specify
an SSLEngine constructor directly without relying on SSLContext. This
allows users to use third-party SSLEngine implementations like netty's
OpenSslEngine together with akka-stream.
2016-11-17 16:07:24 +01:00
Hawstein
96a1d2a081 rewrite Buffer as a GraphStage #21528 2016-11-15 18:48:33 +01:00
drewhk
91b522e186 #21743: FlattenMerge should propagate outer attributes
Added Materializer.materialize() version that takes explicit initial attributes
2016-11-09 20:14:04 +01:00
Andy Chung
fff707781e Took grab and pull out of try 2016-11-04 16:13:11 +00:00
Andy Chung
a6a4d1ac7f Fixed error handling behaviour of Fold and Reduce 2016-11-04 10:38:35 +00:00
Alexander Gavrilov
20942b3126 Fix #21760 - Close Tls connection if Inbound closed before receiving peer's close_notify (#21786)
When application closes inboud using engine.closeInbound the engine can generate an alert message and put it into writer.outboundList. As a result the engine can have a new data packet in outbound and its isOutboundDone will be false. We have to ensure that it will be flushed to the network, that's why we have to update lastHandshakeStatus via the actual status of the engine. Otherwise the actor will transition to the flushingOutbound state but will never flush outbound, since engineNeedsWrap precondition will be false.

Generally speaking whenever we signal something to the SSLEngine, weshould also read getHandshakeStatus afterwards to understand what we need to do next. This was done everywhere but for this engine.closeInbound.
2016-11-04 11:00:13 +01:00
Konrad Malawski
783d961142 reference.conf MUST end with newline (#21755) 2016-10-28 16:46:51 +02:00
Johannes Rudolph
c9854e4350 =pro merge ssl-config-akka from ssl-config project into akka-stream (#21551)
This will fix the cyclic dependency issue between the ssl-config repo
and akka.

It would have been better if akka-stream would not require
these changes at all but com.typesafe.sslconfig.akka.AkkaSSLConfig is
part of the public interface of akka-stream's TLS stage. So, this
can only be fixed in the next major version.

Source code was copied over from the tree at commit
470fae76f3

See https://github.com/typesafehub/ssl-config/issues/47
2016-10-28 16:41:26 +02:00
Konrad Malawski
0127d4f424 +str #18793 StageLogging that allows logger access in stages (#21696)
* +str #18793 StageLogging that allows logger access in stages
Also, non ActorMaterializers can opt-into providing a logger here.

* +str #18794 add javadsl for StageLogging

* fix missing test method on compile only class
2016-10-28 16:05:56 +02:00
Iulian Dragos
abf8b1155c Update package declaration to fit directory. 2016-10-27 18:03:34 +02:00
Ortigali
f970412af7 Rewrite Sink.ignore as a GraphStage #21527 2016-10-26 12:38:49 +02:00
Patrik Nordwall
aa8c253d14 improve streams actor integration docs, #21698 (#21700)
* mapAsync + ask should be the first choice
* add missing Source.queue
* prefer actorRefWithAck
* move ActorPublisher and ActorSubscriber to the end
  with additional warning
* fix wrong doc of SourceQueue offer
* and add missing java api
2016-10-26 10:24:51 +02:00
Konrad Malawski
bcf4de5b2c +str #20795 IOResult construction exposed, in bincompat way (#21070)
* +str #20795 IOResult construction exposed, in bincompat way

Thanks https://github.com/ktoso/kaze-class ;)

* Addressed feedback in IOResult

* Update IOResult.scala

* Update IOResult.scala
2016-10-24 17:00:51 +02:00
Falmarri
a28d2c579f Added a flag on takeWhile to allow it to include the final element, #21330 2016-10-18 12:02:59 +02:00
Mateus Dubiela Oliveira
c3abde60d5 Add scanAsync to Akka Streams, similar to scan but taking a Future (#21553)
* Add comprehensive tests
* Add documentation

* Damn comma after rebase

* Add documentation for foldAsync and scanAsync

* Rename aggreator and aggreating to current

* Remove out availability check

* Revert removing out and some refactors

* Formatting documentation

* Use after instead of Promise in test

* Use package reference to after and some refactoring
2016-10-17 16:43:11 +02:00
Vsevolod Belousov
0e60020c58 fold async emits zero given an empty stream #21562 2016-10-17 09:02:54 +02:00
Boris Korogvich
b690cc049e Improve akka-stream docs (missing an) (#21649) 2016-10-13 11:41:33 +02:00
Stefano Bonetti
0f71b841b5 Include parallelism in mapAsyncUnordered docs #21556 2016-10-04 15:18:08 -05:00
Patrik Nordwall
54f5b836fc Merge branch 'master' into wip-merge-to-master-patriknw 2016-09-29 13:56:37 +02:00
Patrik Nordwall
d37fa8ec02 remove Range.Inclusive subclass (toString), #21548
* remove Range.Inclusive subclass (toString), #21548
* update java8-compat dependency for Scala 2.12-RC1
2016-09-27 13:21:49 +02:00
KAWACHI Takashi
6e0b8b98f3 Fixed typo in GraphInterpreter.scala (#21552) 2016-09-25 01:24:08 +02:00
Nafer Sanabria
94d7237d17 +str add zipWithIndex to FlowOps #21290 2016-09-21 08:41:56 +02:00
Patrik Nordwall
79d8ec87fc Delay should not pull when buffer is full with Backpressure strategy, #21334
Additionally
* nano time conversion and calculation fix
* refactoring of Delay.onPush
2016-09-13 16:10:49 +02:00
drewhk
ec50bd1441 Merge pull request #21447 from drewhk/wip-21446-harden-event-chasing-drewhk
#21446: Completion events must not be swallowed if chasing
2016-09-13 12:17:02 +02:00
Endre Sándor Varga
b2f0ca6750 #21446: Completion events must not be swallowed if chasing 2016-09-13 10:47:08 +02:00
drewhk
47433bc65c Fix initialization order in BroadcastHub caused by an otherwise innocent race #21362 2016-09-13 09:02:53 +02:00
Patrik Nordwall
e8ce261faf Merge branch 'master' into wip-sync-2.4.10-patriknw 2016-09-09 14:12:16 +02:00
Michał Płachta
b3bba1229f Make map stage final and refactor OneBoundedSetup to take a decider. (#21374)
* Remove new from Map constructions
2016-09-08 11:47:17 +02:00
Konrad Malawski
8e35c03f51 =doc fix getStageActor docs typo (remove "not")
As follow up to https://github.com/akka/akka/pull/21323
due to CLA not signed, and released into public domain.
2016-08-31 12:05:12 +01:00
Patrik Nordwall
90cce8579a Merge branch 'master' into wip-sync-artery-dev-patriknw 2016-08-31 08:59:49 +02:00
Patrik Nordwall
a95b2d6746 fail fast in mapAsync for completed failed future, #21318 (#21322)
* fail fast in mapAsync for completed failed future, #21318

* the callback was not run until todo == parallelism or the sync
  event limit was reached, and that can be a problem if upstream
  stages are slow (noticed this for a blocking Kafka producer stage)

* skip callback for completed futures

* fix callback allocation
2016-08-30 19:30:08 +02:00
Johan Andrén
012919fdb3 OrElse stage for fallback when no elements emitted #21024 2016-08-30 13:35:59 +02:00
drewhk
f062687a0e Merge pull request #21259 from drewhk/wip-20933-recoverWith-nondetached-drewhk
#20933: Make RecoverWith non-detached (also eliminates race in test)
2016-08-30 10:38:00 +02:00
Patrik Nordwall
359a087674 Merge pull request #21166 from naferx/sink-graphstage
=str rewrite Sink internal impl as GraphStage
2016-08-30 10:37:30 +02:00
Cédric Chantepie
324a40ba97 =str Refactoring to avoid distinct handler instantiation for stage logics (#21309)
* Refactoring to avoid distinct handler instantiation for stage logics

* setHandlers
2016-08-29 13:00:48 +01:00
Cédric Chantepie
efc87af58a FoldAsync op for Flow #18603 2016-08-24 21:02:32 +02:00
drewhk
67d0d2a4e3 Merge pull request #21183 from drewhk/wip-20890-stream-hub-drewhk
Stream Hubs
2016-08-24 13:33:02 +02:00
Endre Sándor Varga
bc358f3188 20890 Added MergeHub and BroadcastHub 2016-08-24 11:43:24 +02:00
Patrik Nordwall
8ab02738b7 Merge branch 'master' into wip-sync-artery-dev-2.4.9-patriknw 2016-08-23 20:14:15 +02:00
Endre Sándor Varga
32455d3990 #20933: Make RecoverWith non-detached (also eliminates race in test) 2016-08-23 13:13:11 +02:00
Endre Sándor Varga
00f8e4f87a #20887: Reduce GC pressure by compacting to reduce long lived garbage 2016-08-23 12:52:28 +02:00
Patrik Nordwall
fa614f0325 Merge pull request #21208 from kkasravi/issue_21193_kkasravi
fixes #21193 Expose a number of GraphStage attributes
2016-08-23 11:59:42 +02:00
Martynas Mickevičius
640f35ec64 =str #21199 Prevent pull/push from constructor by throwing IllegalStateException (#21252) 2016-08-23 10:44:09 +02:00
drewhk
4f9648e4fd Merge pull request #21139 from drewhk/wip-21135-unbroke-fuzzing-drewhk
#21135: Fix fuzzing mode
2016-08-22 14:00:18 +02:00
Endre Sándor Varga
227f6cfd84 #21135: Fix fuzzing mode 2016-08-22 11:26:50 +02:00
Kam Kasravi
438f489060 fixes #21193 Expose a number of GraphStage attributes 2016-08-18 10:01:43 -07:00
Johan Andrén
a81a61ba1f Balancer should not push to a closed out #20943 2016-08-18 15:44:27 +02:00