Commit graph

60 commits

Author SHA1 Message Date
Julian Tescher
00f6a58e7c Changes all occurances of Typesafe copyright to extend to 2015 2015-03-10 14:12:19 -07:00
Roland Kuhn
d9efd041f7 add akka-typed project with generic ActorRef
This is the first step towards more type-safety in Actor interactions,
comprising:

* generic ActorRef[T] that only accepts T messages
* generic ActorSystem[T] extends ActorRef[T] (sending to the guardian,
  whose Props[T] are provided for ActorSystem construction)
* removed the Actor trait: everything in there has been made into
  messages and signals
* new Behavior[T] abstraction that consumes messages (of type T) or
  Signals (lifecycle hooks, Terminated, ReceiveTimeout, Failed),
  producing the next Behavior[T] as the result each time
* the ask pattern is provided and yields properly typed Futures
* variants of ActorContext are provided for synchronous testing of
  Behaviors

All of this is implemented without touching code outside akka-typed
(apart from making guardianProps configurable), creating wrapper objects
around ActorRef, ActorContext, ActorSystem, Props and providing an Actor
implementation that just runs a Behavior.
2015-01-29 11:42:28 +01:00
Raul Bache
51f5454581 =act Constant value made a val to avoid unnecessary allocation
Changed the parameter type of targetName in PromiseActorRef#apply and changed so that toString of targetName is called once the value is actually needed, eg in the case of timeout.

The creating of the String used in the AskTimeOutException will then be deferred to when timeouts actually occur rather than before, as it was before this change.

Callsites of PromiseActorRef#apply are changed so that they instead of ActorSel#toString and ActorRef#toString send the ActorSel / ActorRef itself, thus not creating the Strings from toString unless necessary, saving StringBuilders and char[] used in ActorRef#toString and ActorSel#toString
2015-01-07 23:56:02 +01:00
Ostapenko Evgeniy
dee5ad3deb =act #16361 Added more information to AskTimeoutException 2014-11-27 11:54:02 +03:00
dario.rexin
2cbad298d6 =all #3858 Make case classes final 2014-03-07 13:20:01 +01:00
Adam Voss
cce29dfa51 Changes all occurances of Typesafe copyright to extend to 2014. 2014-02-04 21:20:09 -06:00
Gaetan Hervouet
4c2eb74c78 =act #3800: Add timeout value in AskTimeoutException message. 2014-01-08 10:14:33 -05:00
Patrik Nordwall
66e4008494 =dat #3780 Deprecate dataflow 2013-12-12 21:44:50 +01:00
Endre Sándor Varga
0f0606121d !act #3637: Add information about target in AskTimeout 2013-12-11 11:12:05 +01:00
Patrik Nordwall
91412a6908 Fix scaladoc warnings in akka-actor, see #3152
* also change wrong visibility of SystemMessage subclasses
2013-07-05 16:28:26 +02:00
Roland
7ea3044af8 fix ActorSelection hashCode/equals and ask, see #3287 #3261 2013-04-30 13:59:07 +02:00
Endre Sándor Varga
7b13ecea25 Terminated is now a SystemMessage 2013-04-10 09:38:11 +02:00
Viktor Klang (√)
0d510ff031 Merge pull request #1290 from akka/wip-3077-deprecate-isTerminated-√
#3077 - Deprecating ActorRef.isTerminated
2013-04-03 15:44:20 -07:00
Viktor Klang
7b263365aa #3077 - Deprecating ActorRef.isTerminated 2013-04-03 23:57:28 +02:00
Viktor Klang
fcfe7b4617 #2970 - Removing scheduler and dispatcher from ARP and reimplementing PromiseActorRef to use an internal calling thread EC 2013-04-03 19:12:03 +02:00
Endre Sándor Varga
f8c3717ca1 Changed Failed to be a SystemMessage
- Moved system messages to their own package.
 - All queueing operations are now hidden behind a SystemMessageList value class
 - Introduced dual SystemMessageList types to encode the ordering in the type.
   - Protects against accidentally missed reverse calls or accidentally reversed lists
   - Makes ordering expectations by fields/parameters explicit
 - Fixed serialization tests
 - Fixes to logging in HierarchyStressSpec
2013-03-22 12:02:31 +01:00
Patrik Nordwall
0f01ffe3a0 Add fail fast checks to prevent null message, see #2800
(cherry picked from commit 5526f9d2a8b01f944ff078ce57f2a03c21649d05)

* Added null check in Envelope.apply
2013-02-20 13:36:42 +01:00
Viktor Klang
adfeb2c1f0 #2879 - updating copyright info 2013-01-09 11:38:00 +01:00
Viktor Klang
f9f2f156e8 #2722 - Making AskableActorRef a value class (cannot be made an implicit value class and retain correct behavior) 2012-12-17 16:14:07 +01:00
Roland
e86144499c remove some FIXMEs
some were left-over residue, some were fixed
2012-10-16 12:06:03 +02:00
Viktor Klang
397083a218 Changing the default sender of ! to be Actor.noSender to keep null in one place and have a logical alternative when deadLetters isn't present in scope. 2012-10-06 00:13:42 +02:00
Patrik Nordwall
ba7a18dde5 Incorporate review feedback, see #2550 2012-09-28 11:18:15 +02:00
Roland
ce49ffe3c6 remove all but one occurrence of single-arg tell() 2012-09-19 23:55:53 +02:00
Roland
251a62293a unb0rk akka-actor-nightly build
This means tightening types from Duration to FiniteDuration in several
places; a good thing, since we replace runtime complaints by compile
time errors.
2012-09-14 16:44:38 +02:00
Roland
43170ff168 redo ChildTerminated() processing, see #2391"
the previous patch of including the UID in the Terminated message did
suffer from the system vs. normal message ordering problem, hence I
reverted the previous fix and replaced it by sending a NullMessage after
ChildTerminated, exactly like in the Supervise case.
2012-08-22 17:31:01 +02:00
Roland
a15900a591 port onto SBT-0.12 branch 2012-08-22 11:10:36 +02:00
Roland
d6f42ca344 remove child in Terminated() processing, see #2391 2012-08-19 21:07:04 +02:00
Viktor Klang
af8ce260d3 Correcting erronous code links 2012-07-25 13:26:33 +02:00
Viktor Klang
21e5133443 #2335 - Adding better failures to AskSupport and added clearer error messages 2012-07-23 13:52:48 +02:00
Viktor Klang
1261fab3af Removing akka.util.NonFatal and replacing it with scala.util.control.NonFatal 2012-07-22 15:33:18 +02:00
Viktor Klang
1bf0fe4448 Partial migration to M5 2012-07-17 17:21:08 +02:00
Viktor Klang
52d33113d9 Partial work + broken commit 2012-07-04 15:25:30 +02:00
Viktor Klang
cd0c89d939 Adding -feature and trying to find scala versions for our akka-actor-test dependencies. Also updating the version of Scalatest, specs2 and junit 2012-06-15 13:04:10 +02:00
Viktor Klang
17ee47079a Incorporating Roland's feedback 2012-06-02 14:49:28 +02:00
Viktor Klang
aef05497f5 Adding some error ouput for violated invariants in ASkSupport 2012-06-01 14:49:12 +02:00
Viktor Klang
c64db4b00d Code formatting 2012-05-30 15:37:29 +02:00
Viktor Klang
8bdb870246 Implementing death watch for PromiseActorRef 2012-05-30 13:24:38 +02:00
Viktor Klang
e3e391e5aa Removing DaemonMsgWatch, oh yeah baby. However, still no cigar 2012-05-29 14:14:06 +02:00
Viktor Klang
96f264e842 Initial stab at DeathWatch 2.0, tests don't pass just yet 2012-05-28 16:49:49 +02:00
Viktor Klang
4fb4903225 Further work on binary compatibility 2012-05-18 16:41:19 +02:00
Viktor Klang
2bb255b480 Removing ActorTimeoutException everywhere... I swear it... 2012-05-18 15:23:21 +02:00
Viktor Klang
5afe6601ff Removing ActorTimeoutException since it was only used in GracefulStop, and changed GracefulStop to use PromiseActorRef instead of spawning a toplevel actor 2012-05-18 14:55:38 +02:00
Roland
afd81d8506 Revert "closes #2019: Use parentheses for arity-0 methods which are not referentially transparent"
This reverts commit 8dbfbbe966.
2012-05-03 21:14:47 +02:00
Heiko Seeberger
8dbfbbe966 closes #2019: Use parentheses for arity-0 methods which are not referentially transparent 2012-04-24 16:38:21 +02:00
Mathias
d618aeb7ea Decrease memory footprint of PromiseActorRef by ca. 30% (two ref fields) 2012-03-27 09:28:54 +02:00
Mathias
791ec0f611 Another round of improvements to PromiseActorRef 2012-03-24 23:27:01 +01:00
Mathias
8fc66ce044 Improve PromiseActorRef as per team comments 2012-03-23 21:35:52 +01:00
Mathias
cb7271f974 Make provider registration of PromiseActorRefs lazy
By only registering a PromiseActorRef on access to `path`
we can shave off about 30% of the overhead involved in the common,
purely local `ask` use case.
Unfortunately `path` is accessed not only for ActorRef serialization
but also during `toString`, `equals` and `hashCode`, so one should
be careful how to handle PromiseActorRefs in hot paths.
2012-03-23 16:50:39 +01:00
Mathias
e909757fc5 Fix PromiseActorRef bang potentially throwing IllegalStateException
The previous implementation contained a race condition potentially violating the "bang never throws exception" contract
2012-03-23 16:50:39 +01:00
Viktor Klang
e88fc3d660 #1891 - Adding cause and message to AskTimeoutException 2012-03-06 14:56:46 +01:00