Commit graph

1481 commits

Author SHA1 Message Date
Luc Bourlier
4ee1ae09a5 Adds Flow.asFlowWithContext 2019-02-21 18:52:01 +01:00
Christopher Batey
111cbc28e9 Make the OO example use classes for all the behaviors (#26407)
Where as it is valid that stateless actors don't benifit I see
java users using the for everything.:wq
2019-02-21 16:49:22 +01:00
Christopher Batey
ea8e3ace33 Harden RateTransformationDocSpec: Use test patience rather than hadcode #26262 2019-02-21 16:42:24 +01:00
Patrik Nordwall
d3836aecfb Command handler builder for EventSourcedBehaviorWithEnforcedReplies, #25482 (#26272)
* It uses ReplyEffect instead of Effect
* Unfortunatley the solution is a copy of the CommandHandler builder with
  a few mechanical changes to the types and names.
* I tried to separate interface and implementation and use a shared implementation,
  but it didn't work out because methods with such function parameters which only differ in
  their type parameters can't be overloaded.
2019-02-17 19:54:32 +00:00
Seth Tisue
fc23f03031 upgrade to latest ScalaTest (#26387)
stuff moved to a new package. you wouldn't expect that in a point
release, but they put type aliases in place so Scala users wouldn't
notice. but the change is visible to Java code.

the upgrade is not strictly necessary, but it would be convenient
for the Scala 2.13 community build to have this merged, so I don't
have to maintain these changes in our Akka fork
2019-02-17 19:45:39 +00:00
Tomek Kopczynski
532a9bc604 Trivial typo fix in Streams docs (#26359) 2019-02-13 13:58:25 +01:00
Christopher Batey
baf74a4fe6
Remote remoting deployment from artery docs (#26342)
* Remote deployment is not recommended and the section is duplicated
from classic remoting
* Move what's new lower down in prep for it becoming the main remoting
page but link to it for users are migration
2019-02-13 07:57:34 +00:00
Johan Andrén
8fabb73f2b Make the AbstractBehavior builder mutable (#26309)
* Make the AbstractBehavior builder mutable #26260

* Use mutable builder style in first sample, mention that fluent is an option

* A bit of rework of the Java builders:

 * onAnyMessage added
 * use the japi SAMs throughout in the APIs
 * avoid wrapping the japi functions in Scala functions for the most common cases
 * more Java test coverage

* Not just any exception

* Works on 2.11 as well as 2.12
2019-02-12 15:38:35 +01:00
Johannes Rudolph
1b9b562696
Merge pull request #26297 from kajebiii/patch-1
move "#start-stop"'s start line
2019-02-07 14:53:35 +01:00
Patrik Nordwall
db30f6a9e0 unsaved actor_top_tree.svg
* svg without saved changes must have been pushed before
2019-02-03 19:25:56 +01:00
o-pikozh
ef3870369a Typo in futures.md (#26316)
Small letter at the start of the sentence.
2019-02-01 08:52:47 +01:00
Patrik Nordwall
9d6aa8ae94
Merge pull request #26289 from akka/wip-javadsl-blog-sample-patriknw
Cleanup javadsl Blog Post sample in Persistence Typed
2019-01-31 16:28:34 +01:00
Patrik Nordwall
dbcc54b0b2
Add and improve javadsl Persistence Typed samples (#26287)
* Complete the javadsl account examples in Persistence Typed docs

* corresponding style variations as in the scaladsl samples
* adding mutable state sample for Java (not interesting for Scala)

* cleanup the first example in Persistence Typed docs

* move ActorContext snip in Persistence Typed docs
2019-01-31 16:27:26 +01:00
Patrik Nordwall
db64a54c69
Merge pull request #26299 from helena/naming-consistency-shard-coordinator
Use one naming convention for ShardCoordinator in doc and logging
2019-01-29 15:06:41 +01:00
Helena Edelson
c3a9cd1fe4 Use one naming convention for ShardCoordinator in doc and logging for search efficiency. 2019-01-29 02:27:45 -08:00
Patrik Nordwall
2c531f0422
Merge pull request #26270 from akka/exampleProjectLinks
Fix dead links to samples
2019-01-29 09:18:03 +01:00
Arnout Engelen
4acfdf6f7b
Merge pull request #26259 from johanandren/wip-26257-cluster-client-caveats-johanandren
Cluster client caveats
2019-01-29 09:12:01 +01:00
Jongbeom Kim
b7eabdee73
move "#start-stop"'s start line
Line 118 : val first = system.actorOf(StartStopActor1.props, "first")

Need "object StartStopActor1" to compile well.
2019-01-29 10:34:58 +09:00
Patrik Nordwall
43a46c3f1b Make discovery and dns APIs stable
* remove ApiMayChange
2019-01-28 20:01:19 +01:00
Patrik Nordwall
491d7efc60 Cleanup javadsl Blog Post sample in Persistence Typed 2019-01-28 07:22:59 +01:00
Arnout Engelen
5701f5fd6d
Fix dead links to samples 2019-01-21 08:51:34 +01:00
Patrik Nordwall
794a8cc6ff Stashing in persistent behavior, #25717
* Effect.stash, Effect.thenUnstashAll
* unstash one at a time, and start with external stash if UnstashAll is in progress
* handle restarts
* handle PoisonPill
* fix PerformanceSpec, because now the internal stash is cleared if exception is thrown
* work with PoisonPill
2019-01-18 17:47:51 +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
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
Johan Andrén
0be752efcb Cluster client caveats #26257 2019-01-17 19:13:22 +01:00
Pierre-Marie Padiou
dcb17b1d0c Fix comment in hashtag example of streams quickstart doc 2019-01-17 16:51:28 +01:00
Patrik Nordwall
b4fa591d64
Support stop or keep of child actors when parent is restarted, #25556
* stash messages and signals while waiting for children to be stopped
* handle watch of other actors
* exception from unstash
* exception from first setup
* merge RestartSupervisor and BackoffSupervisor
* API change: restartWithLimit => restart.withLimit
* remove unused PreStart
* docs
* move BubblingSample to separate class
* fix: fail after more than limit in restart.withLimit when deferred factory throws
* match case RestartOrBackoff instead
2019-01-17 16:48:22 +01:00
Seeta Ramayya
67902d82bc Corrected documentation (#26159) 2019-01-17 12:16:52 +01:00
Patrik Nordwall
f4defb139b
use receiveOne instead of receiveMessageType, #25914
* use receiveOne instead of receiveMessageType, #25914

* when the type is the same as the probe's type

* formatting

* rename receiveOne to receiveMessage

* rename receiveN to receiveMessages

* have to use different name in javadsl so that became receiveSeveralMessages
2019-01-15 09:23:30 +01:00
hepin1989
998c5a9285 Formatting java codes with sbt-java-formatter. 2019-01-12 04:00:53 +08:00
Arnout Engelen
d274e039f9
Various scala-2.13.0-M5 fixes
fix akka-actor-tests compile errors

some tests still fail though

Fix test failures in akka-actor-test

Manually work arround missing implicit Factory[Nothing, Seq[Nothing]]

see https://github.com/scala/scala-collection-compat/issues/137

akka-remote scalafix changes

Fix shutdownAll compile error

test:akka-remote scalafix changes

akka-multi-node-testkit scalafix

Fix akka-remote-tests multi-jvm compile errors

akka-stream-tests/test:scalafix

Fix test:akka-stream-tests

Crude implementation of ByteString.map

scalafix akka-actor-typed, akka-actor-typed-tests

akka-actor-typed-tests compile and succeed

scalafix akka-camel

scalafix akka-cluster

akka-cluster compile & test

scalafix akka-cluster-metrics

Fix akka-cluster-metrics

scalafix akka-cluster-tools

akka-cluster-tools compile and test

scalafix akka-distributed-data

akka-distributed-data fixes

scalafix akka-persistence

scalafix akka-cluster-sharding

fix akka-cluster-sharding

scalafix akka-contrib

Fix akka-cluster-sharding-typed test

scalafix akka-docs

Use scala-stm 0.9 (released for M5)

akka-docs

Remove dependency on collections-compat

Cherry-pick the relevant constructs to our own
private utils

Shorten 'scala.collections.immutable' by importing it

Duplicate 'immutable' imports

Use 'foreach' on futures

Replace MapLike with regular Map

Internal API markers

Simplify ccompat by moving PackageShared into object

Since we don't currently need to differentiate between 2.11 and

Avoid relying on 'union' (and ++) being left-biased

Fix akka-actor/doc by removing -Ywarn-unused

Make more things more private

Copyright headers

Use 'unsorted' to go from SortedSet to Set

Duplicate import

Use onComplete rather than failed.foreach

Clarify why we partly duplicate scala-collection-compat
2019-01-11 12:27:18 +01:00
kerr
cc19367588 More Java getters for akka.actor.AbstractActor.ActorContext #26161 2019-01-09 20:13:56 +01:00
Jeffrey Chung
eeafbff4dc Make it clearer that StreamRefs should be used with Akka Cluster (closes (#26213)
Make it clearer that StreamRefs should be used with Akka Cluster (closes #26173)

Retain the use of "as"
2019-01-08 11:24:33 +01:00
airt
e124d11995 add examples for scan operator #25468 2019-01-04 15:08:54 +01:00
Seeta Ramayya
f8618b24b0 added examples for Stream # actorRef operator. As part of #25468 (#26162) 2019-01-02 17:08:35 +01:00
Seeta Ramayya
1cae9b0d44 25468: added examples for Stream # cycle operator. (#26163) 2019-01-02 15:46:13 +01:00
Martin Grotzke
f3b7d316b2 Document how to observe mocked behavior with typed ActorTestKit #26116 2019-01-02 15:30:55 +01:00
Martynas Mickevičius
f6f4611d4a Two typo fixed in the typed persistence docs (#26168) 2019-01-02 13:24:28 +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
Patrik Nordwall
b48938f4a0
Improve default shard rebalancing algorithm, #26012 (#26101)
* Improve default shard rebalancing algorithm, #26012

* Use rebalance-threshold=1 because it will give the best distribution,
  and previous default could result in too large difference between nodes
* Off by one error, difference > threshold vs >=
* Added more unit tests
* Note that in some cases it may still not be optimal, stopping more
  shards than necessary, but a different strategy that looks at more
  than most and least is out of scope for this issue. In practise
  those cases shouldn't matter much.
* Also note that the rebalance interval is by default 10 seconds,
  so typically shards will start up before next rebalance tick.
  It's intentionally a slow process to not cause instabilities by
  moving too much at the same time.
2018-12-21 13:39:41 +01:00
Patrik Nordwall
5f409c17e0 clarify docs of ActorTestKit.stop, #24165 2018-12-21 12:53:18 +01:00
Michael Kholodov
220021b87f Akka-typed-testkit: Provides a way of stopping actors #24165
* Added ActorTestKit#stop method and corresponding tests.
* Added 'Stopping actors' section to the docs
* Stop actor now waits until the actor terminates.
2018-12-21 11:37:34 +01:00
Helena Edelson
d74426a255 Rename akka.actor.typed.ActorContext #25734 (#26146) 2018-12-21 11:17:26 +01:00
kerr
15e2527629 Deprecate resolveOneCS which accept FiniteDuration. (#26067) 2018-12-19 14:54:22 +01:00
RomanIakovlev
4055a42899 Update the typed cluster sharding documentation to use new terminology #26120
EventSourcedEntity instead of PersistentEntity
2018-12-18 15:47:10 +01:00
James Roper
762c9cb019 Async DNS search domain support (#25987)
Fixes #25825

Provides search domain support for Async DNS.

There are two parts here, first is the search domain support itself,
which is relatively straight forward - on lookup, create a list of hosts
to attempt to resolve based on the search domains configuration
(including the host with no postfix), exclude all those hosts that have
less dots than the configured ndots, and then search until you find one
that returns any records. In this case the search domains are applied for
each nameserver attempt, so if a particular nameserver times out, it
won't attempt to search any more domains on that nameserver.

The second part is in actually detecting the system configuration. I've
only implemented partial support here, it reads /etc/resolv.conf, and
nothing else. There are ways to detect it on other platforms, there are
also environment variables that are supposed to be honored on Linux and
other *nix's, but to keep this change manageable, I've focussed on just
supporting the minimum to meet the Kubernetes service discovery use case,
and documented the limitations.
2018-12-17 17:42:20 +01:00
Patrik Nordwall
5deaacbf94 more api may change warnings in Typed docs (#26124) 2018-12-17 17:39:59 +01:00
Helena Edelson
8a44fca087
Typed Distributed Data requires untyped Cluster #25746 (#26074)
Typed Distributed Data requires untyped Cluster [#25746](https://github.com/akka/akka/issues/25746)
2018-12-14 15:53:08 -05:00
Christopher Batey
2c145cd3c3 Clarify migration from old akka management discovery (#26102) 2018-12-13 11:57:59 +01:00
Arnout Engelen
b40d28b885
Fix link to lagom 2018-12-10 15:52:38 +01:00