Commit graph

20709 commits

Author SHA1 Message Date
Patrik Nordwall
144fbb50ef Merge pull request #22854 from akka/wip-22840-PostStop-patriknw
signal PostStop also when voluntarily stopped, #22840
2017-05-05 14:45:56 +02:00
Patrik Nordwall
0428bc82d2 Merge pull request #22856 from johanandren/wip-22753-move-typed-inbox-to-testkit-johanandren
Moved typed inbox to testkit
2017-05-05 14:44:36 +02:00
Patrik Nordwall
ecb9d333fc Merge pull request #22855 from johanandren/wip-22828-typed-dispatchers-lookup-johanandren
Typed: Factory methods for dispatcher selector props
2017-05-05 14:43:53 +02:00
Johan Andrén
e56ac943a2 Moved typed inbox to testkit #22753 2017-05-05 14:04:32 +02:00
Johan Andrén
cf7dd8b752 Factory methods for dispatcher selector props #22828 2017-05-05 13:23:57 +02:00
Johan Andrén
f963ed4ae4 Extensions for Akka typed, #16738 2017-05-05 13:22:01 +02:00
Patrik Nordwall
57a5026410 signal PostStop also when voluntarily stopped, #22840
* possibility to use another behavior for the PostStop signal,
  but default is to use current behavior
* it was difficult to fix the ActorContextSpec, mostly because
  StepWise is an unknown beast, at some point we will replace that
2017-05-05 13:19:00 +02:00
Patrik Nordwall
9dce4b9065 minor follow up on PR #22794 (#22851)
* and MonitoringTest didn't terminate actor system
2017-05-05 12:02:22 +02:00
Patrik Nordwall
6585aa53df Merge pull request #22848 from akka/wip-22847-ActorSystem.create
Java API for ActorSystem.create, #22847
2017-05-05 10:07:46 +02:00
Patrik Nordwall
ab1b4a9570 Merge pull request #22795 from johanandren/wip-22127-2-typed-spec-fail-johanandren
Don't schedule messages on a scheduler that might be shut down already
2017-05-05 09:50:06 +02:00
Arnout Engelen
090893179f Implement watchWith to customize the termination msg, #18778
* Add test with both normal and adapted AS

And add watch method on Actor, fix comment

* Formatting

* Avoid 'unreachable' in javadocs as it could be confusing

* Fix unwatching

* Exclude added methods from MiMa

* Some comments and variable names

* Fix compilation errors after rebase

* More specific docs on when Terminated is sent
2017-05-05 09:13:32 +02:00
Patrik Nordwall
9393a24125 Java API for ActorSystem.create, #22847
* because it's a trait the static forwarders are missing when compiled with Scala 2.11
* changed ActorRef to a pure interface (trait) instead of abstract class and then ActorSystem
  can be an abstract class instead
* also, improved docs of deferred
2017-05-05 08:10:39 +02:00
Arnout Engelen
01cd05f6a9 javadsl BehaviorBuilder, #22748
Partially based on https://github.com/akka/akka/compare/master...johanandren:play-around-with-typed-pre-2.5-rc1?expand=1

* remove build(), add methods, predicates

* akka.japi.function, docs, construction

* Javadocs, stand-alone entrypoints

* No case class to pollute the javadocs less

* Make BehaviorChain a proper BehaviorBuilder again

Separating these steps will keep us more flexible to introduce optimizations
later, at the expense of not being able to use the BehaviorBuilder as a
Behavior directly

* Less awkward generic when constructing the builder from Java

* Shorten/DRYer implementation for adding message/signal handlers

* Introduce 'mutable' javadsl builder API

* Use onMessage/onSignal in the builder as well

* Return unhandled if no case matches

* Using builder but extend MutableBehavior

* Use 'receive' terminology
* Use 'onMessage'/'onSignal' for receive builder, too
* 'unhandled' when no case matches
* Receive interface, promote 'this' for mutable behaviors
* Move ReceiveBuilder tests to its own file
* Remove need for StateHolder
* Test for and fix initialization issue
* Avoid lazy val during mutable actor initialization
2017-05-04 19:07:12 +02:00
Patrik Nordwall
6060e3ef67 Merge pull request #22830 from akka/wip-onSignal-pf-patriknw
call onSignal as a PartiaFunction, #22662
2017-05-04 14:36:38 +02:00
Patrik Nordwall
d53c6c3d41 call onSignal as a PartiaFunction, #22662
* some missing pieces of the singal PF
2017-05-04 13:49:28 +02:00
Patrik Nordwall
72d70b004d Merge pull request #22810 from akka/wip-16742-timers-patriknw
support for safe timers, periodic scheduling, #16742
2017-05-04 13:39:42 +02:00
Patrik Nordwall
db0e170d32 support for safe timers, periodic scheduling, #16742
* implemented an Intercept behavior that can handle the
  scheduled TimerMsg, even though it's of a different type
* Intercept is similar to Tap but more powerful, implemented
  Tap with Intercept. Intercept is internal API.
* When wrapping a behavior, e.g. Tap, the outer behavior must also be
  Deferred if the wrapped behavior is Deferred
* PostStop not signaled when stopped voluntarily, intercept messages
  to cancel timers when stopped is returned
2017-05-04 13:06:59 +02:00
Patrik Nordwall
c55fec6a43 Merge pull request #22829 from akka/wip-lower-scaladsl-patriknw
rename Actor behavior factory methods to lower case, #22805
2017-05-04 12:58:24 +02:00
Patrik Nordwall
01c3550677 Merge pull request #22806 from akka/wip-22804-spawnAdapter-patriknw
rename createAdapter to spawnAdapter (again), #22804
2017-05-04 12:56:58 +02:00
Patrik Nordwall
dd14c7d85e Merge pull request #22832 from akka/wip-22763-TypedSpecSpec-patriknw
silence scary printTree in TypedSpecSpec, #22763
2017-05-03 15:59:35 +02:00
Patrik Nordwall
24f625393f Merge pull request #22831 from akka/wip-typed-protocal-patriknw
use "akka" as protocol also for typed
2017-05-03 15:58:59 +02:00
Patrik Nordwall
bc01d936f1 silence scary printTree in TypedSpecSpec, #22763 2017-05-02 21:11:12 +02:00
Patrik Nordwall
a2bf46f901 use "akka" as protocol also for typed 2017-05-02 20:56:49 +02:00
Patrik Nordwall
39ad32601a rename Actor behavior factory methods to lower case, #22805 2017-05-02 20:13:20 +02:00
Patrik Nordwall
163248198c refactoring of ActorContext hierarchy, #22804
* by making akka.typed.ActorContext empty, only providing
  asScala and asJava the mixed scaladsl and javadsl is never
  exposed to user
* thereby no ambigious spawnAdapter overload
* the only time akka.typed.ActorContext is exposed is when
  implementing an ExtensibleBehavior, but that should be rare
  and it's good to explicity choose asJava or asScala in that case
* no overhead since all of them are still the same instance
2017-05-02 20:06:36 +02:00
Patrik Nordwall
202c2340da rename createAdapter to spawnAdapter (again), #22804 2017-05-02 19:57:55 +02:00
Johan Andrén
cae2f57abf Rename DeploymentConfig to Props #22660 2017-05-02 15:01:18 +02:00
Patrik Nordwall
326bc9c909 Merge pull request #22801 from akka/wip-22749-javadsl-patriknw
implement javadsl in Scala, #22749
2017-04-28 17:51:23 +02:00
Patrik Nordwall
2eb41b910a implement javadsl in Scala, #22749
* and separate scaladsl api and impl, #22749
2017-04-28 15:46:27 +02:00
Patrik Nordwall
fabb81e52c Merge pull request #22765 from akka/wip-21217-restart-patriknw
complete and test Restarter, #21217
2017-04-28 15:40:42 +02:00
Patrik Nordwall
aceca4cc24 complete and test Restarter, #21217
* supervisor strategies API
* limited restarts
* backoff restarts
* tests
* eager creation (not on first message) of underlying behavior of Restarter
2017-04-28 15:07:06 +02:00
Patrik Nordwall
946f2ffd4e add testkit for real asynchronous testing, #22764 2017-04-28 15:03:09 +02:00
Martynas Mickevičius
18062ef06e Merge pull request #22798 from 2m/wip-22662-on-signal-partial-2m
#22662 Partial Function for onSignal
2017-04-28 13:48:50 +03:00
Martynas Mickevičius
8c8683c80d #22662 Partial application for signal management 2017-04-28 08:33:28 +03:00
Martynas Mickevičius
6cbd80e86e #22662 Convert onSignal to partial function 2017-04-28 08:31:53 +03:00
Martynas Mickevičius
e3e2f32592 #22662 Refactor to onSignal builder method instead of constructor parameter 2017-04-28 08:31:53 +03:00
Patrik Nordwall
d4947010f4 Merge pull request #22767 from ktoso/wip-typed-expose-same-behavior
=typ #22736 expose Behavior.Same and friends
2017-04-27 11:35:20 +02:00
Patrik Nordwall
df3353a066 Merge pull request #22739 from ktoso/wip-typed-hide-bang
+typ #22663 move symbolic ! into implicit class of ActorRef
2017-04-27 11:00:35 +02:00
Patrik Nordwall
7c814fd20a Merge pull request #22800 from akka/TypedSpecSpecStopActorSystem
Stop adapted actorsystem after running TypedSpec (#22763)
2017-04-27 10:58:34 +02:00
Patrik Nordwall
ef1ea6f0ea Merge pull request #22799 from stanislav-chetvertkov/wip-22718-2
Rename `management` to `receiveSignal` and `message` to `receiveMessa…
2017-04-27 08:35:43 +02:00
Arnout Engelen
e63239e337 Stop adapted actorsystem after running TypedSpec (#22763) 2017-04-26 17:05:12 +02:00
Arnout Engelen
eb7ba7fc48 Remove reference to Total from akka-typed docs #22610 (#22797) 2017-04-26 07:20:19 -07:00
stanislav
3d031c0262 Rename management to receiveSignal and message to receiveMessage #22718 2017-04-26 17:13:00 +03:00
Johan Andrén
993a204143 Don't schedule messages on a scheduler that might be shut down already #22127 2017-04-26 14:14:45 +02:00
Arnout Engelen
cccadc6ec7 Rename 'stateful' to 'immutable' in MonitoringTest too (#22793) 2017-04-26 02:04:45 -07:00
Konrad `ktoso` Malawski
6c40da71dd =typ #22736 expose Behavior.Same and friends 2017-04-24 17:19:52 +09:00
Arnout Engelen
2065edb3d1 Add generic parameter to watch/unwatch (#22696)
@ktoso mentioned in https://github.com/akka/akka/pull/22683#discussion_r110620041
this makes the methods more usable in the Java API. Added a test showing monitoring (watching) from the Java API
2017-04-21 16:26:26 +02:00
Patrik Nordwall
4b12ce2376 Merge pull request #22744 from 2m/wip/22687/undefer-poststop/2m
Do not interpret DeferredBehaviors on termination
2017-04-21 08:46:47 +02:00
Martynas Mickevičius
f75bb75f3e #22744 Remove preStart 2017-04-20 12:23:39 +03:00
Martynas Mickevičius
124c374a5f #22687 Undefer before terminate 2017-04-20 11:09:38 +03:00