Commit graph

107 commits

Author SHA1 Message Date
Patrik Nordwall
fd11b94b1f Remoting for Akka Typed, #21225
* seems like it will just work when using the adapters, since
  it will simply delegate to the untyped RemoteActorRef
* ActorRefResolver was added for upporting erialization of typed ActorRef
* The ActorRef itself is not serializable with Java serialization,
  and we shouldn't do that
2017-09-08 10:21:29 +02:00
Johan Andrén
48144467aa =typ toTyped always returning the same adapter #23405 (#23441) 2017-08-09 14:13:57 +09:00
Heiko Seeberger
ba3f6a6c14 Move name parameter to 2nd pos. in typed system factories (#23244) 2017-07-04 08:13:51 +01:00
Arnout Engelen
f038d16ac9 Add Java API 'getRef' to 'Terminated' (#22985) (#23021)
* Add Java API 'getRef' to 'Terminated' (#22985)

* Expose `ActorRef[Nothing]` as `ActorRef[Void]` in Java API

* Expose `ActorRef[Void]` as Java API for more objects
2017-05-26 03:01:47 -07:00
Konrad `ktoso` Malawski
b3a1b48467 !typ #22970 Actor.restarter renamed to supervise (#23015)
* !typ #22970 Actor.restarter renamed to supervise

* =typ cache NothingClassTag for supervision

* cleanup
2017-05-24 11:23:18 +02:00
Arnout Engelen
0d6cacbc66 Merge pull request #23011 from akka/akka-typed-console
Sbt console initialization in akka-typed
2017-05-23 04:57:24 -07:00
Arnout Engelen
3607bf9303 Sbt console initialization in akka-typed
It appears stacked imports don't work when used in one `initialCommands`
line.
2017-05-23 13:05:46 +02:00
Patrik Nordwall
4f5ebf1890 don't continue processing after fatal exception, #22946 2017-05-23 11:36:19 +02:00
Patrik Nordwall
74999312a6 fix concurrency bug in typed ActorCell, #22946
* !queue.isEmpty is not an quarantee that queue.poll will return non-null,
  see JavaDoc in AbstractNodeQueue
* the reproducer in the issue triggered dropping because mailbox was full
2017-05-23 11:14:46 +02:00
Patrik Nordwall
750d5afee6 Merge pull request #22935 from akka/wip-22934-fix-deferred-RK
Actor.deferred should stop when factory yields stopped, #22934
2017-05-22 10:05:11 +02:00
Patrik Nordwall
d14fb2c2d6 abstract class SupervisorStrategy for Java API, #22961
* missing static forwarders for Java API for Scala 2.11 when using trait + object
2017-05-16 07:56:35 +02:00
Roland Kuhn
8d9152853b Actor.deferred should stop when factory yields stopped, #22934 2017-05-13 14:01:43 +02:00
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
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
d53c6c3d41 call onSignal as a PartiaFunction, #22662
* some missing pieces of the singal PF
2017-05-04 13:49:28 +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
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
2eb41b910a implement javadsl in Scala, #22749
* and separate scaladsl api and impl, #22749
2017-04-28 15:46:27 +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
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
stanislav
3d031c0262 Rename management to receiveSignal and message to receiveMessage #22718 2017-04-26 17:13:00 +03: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
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
Patrik Nordwall
8b2e4ed33f remove stateless, rename stateful to immutable, #22325 2017-04-20 10:01:34 +02:00
Patrik Nordwall
961b4bad2b typed MutableBehavior API (#22732)
* API suggestion of MutableBehavior

* cleanup

* moved IntroSpec to akka-typed-tests for more efficient dev environment
* scaladsl.MutableBehavior

* add mutable to BehaviorSpec

* return this instead of same
2017-04-20 09:58:48 +02:00
Konrad `ktoso` Malawski
e6a99251c2 +typ #22663 move symbolic ! into implicit class of ActorRef 2017-04-19 13:04:06 +09:00
Patrik Nordwall
ebb5748d6a Complete adapter API for coexistence of typed and untyped actors, #22174
* Trying out what is working and what is missing with a test
* Add missing API and cleanup (public vs internal)
* Note that PropsAdapter will make it possible to use Cluster Sharding
  with typed entity actors
* add javadsl for the adapters, and full java tests for that
* Add narrow to ActorRef
2017-04-12 16:38:06 +02:00
Martynas Mickevičius
e6dbc865e9 #21524 Moved {Stubbed,Effectful}ActorContext to testkit 2017-04-10 13:41:19 +03:00