Commit graph

12466 commits

Author SHA1 Message Date
Roland
c54e7b2a28 add pimp for Future.pipeTo(Channel), closes #1235
cherry-picked from release-1.3

The ticket contains more methods around this issue, both on Actor and
Future itself, but I think it is better to provide the basic primitive
in a way which does not further couple Future and Actor. Will need to be
revisited for 2.0.
2011-10-25 11:48:27 +02:00
Roland
3e3f5320f6 document anonymous actors and their perils, fixes #1242
cherry-picked from release-1.3
2011-10-25 11:48:21 +02:00
Roland
676a712ceb remove all use of Class.getSimpleName; fixes #1288
cherry-picked from release-1.3
2011-10-25 11:48:04 +02:00
Roland
076ec4d0a0 add missing .start() to testing.rst, fixes #1266
cherry-picked from release-1.3
2011-10-25 11:47:45 +02:00
viktorklang
33bcb38fcd Merge pull request #96 from amir343/master
A typo is corrected in Future example Scala code, by Amir!
2011-10-24 02:00:49 -07:00
Viktor Klang
f762575349 #1109 - Fixing some formatting and finding that Jonas has already fixed this 2011-10-23 00:58:02 +02:00
Viktor Klang
e1a3c9dff5 #1059 - Removing ListenerManagement from RemoteSupport, publishing to AkkaApplication.eventHandler 2011-10-23 00:40:09 +02:00
Roland
b39bef69ec Fix bug in DeathWatchSpec (I had forgotten to wrap a Failed) 2011-10-21 19:07:17 +02:00
Roland
92321cd498 relax over-eager time constraint in FSMTimingSpec 2011-10-21 18:51:54 +02:00
Roland
fc8ab7dad8 fix CallingThreadDispatcher and re-enable its test 2011-10-21 18:47:44 +02:00
Roland
bb942750aa make most AkkaSpec-based tests runnable in Eclipse 2011-10-21 17:01:22 +02:00
Amir Moulavi
4638f834e3 A typo is corrected in Future example Scala code 2011-10-21 16:14:37 +02:00
Viktor Klang
bb0b845607 Preparing to remove channels and ActorPromise etc 2011-10-21 15:51:38 +02:00
Roland
d55f02e6c1 merge master into parental-supervision, fixing up resulting breakage 2011-10-21 15:11:43 +02:00
Viktor Klang
9dd0385301 Moving postMessageToMailbox* to ScalaActorRef for some additional shielding. 2011-10-21 14:00:55 +02:00
Peter Vlugter
52595f3692 Fix the scaladoc generation again so that nightlies work 2011-10-21 10:19:04 +02:00
Patrik Nordwall
550ed58bf7 Included akka-sbt-plugin in build, since I need timestamped version to be published 2011-10-21 08:53:00 +02:00
Roland
3b698b9470 nearly done, only two known test failures
- moved typed actor factories to app/context (like actor factories)
- fixed a few misplaced supervision changes, all such tests green now
- actually test akka-reference.conf in ConfigSpec
- made DispatcherActorSpec more deterministic (failed intermittently
  here, was due to race towards thread pool)
- wrapped all actor initialization failures into
  ActorInitializationException and made sure that this leads to Stop
- default to Stop on ActorKilledException
- fixed ActorModelSpec to separately supervise the “waves of actors”
  because otherwise the app.guardian is way too busy processing all
  those ChildTerminated messages
- change ActorCell._children from Vector[Stats] to TreeMap[ActorRef,
  Stats] for performance reasons, have not measured memory impact, yet
- ensured that InterrupedException does not leave current thread via
  Failed message to supervisor (wrapped in ActorInterruptedException)
- set core-size=1 and max-size=4 for default dispatcher during test
2011-10-20 23:37:54 +02:00
Roland
172ab31f2a improve some, but tests are STILL FAILING
- AkkaApplication.stop() will stop the guardian; when that stops, it
  will send ChildTerminated to the BubbleWalker, who will then complete
  a Promise
- AkkaApplication.terminationFuture is that Promise and available for
  registration of onComplete callback, used now to shutdown the
  Scheduler
- AkkaSpec extends BeforeAndAfterAll and uses that to call app.stop(),
  exposing atStartup() and atTermination() overridable hooks
- fixed some tests
2011-10-20 20:45:02 +02:00
Kjell Winblad
f21ed099fc Made improvements to IndexSpec after comments from Viktor. 2011-10-20 20:34:14 +02:00
Kjell Winblad
6a137f5a86 Merge branch 'master' of https://github.com/jboner/akka 2011-10-20 20:03:03 +02:00
Jonas Bonér
10fc175c09 Removed reference to non-committed code 2011-10-20 15:40:05 +02:00
Jonas Bonér
303d34692d Merge branch 'master' of github.com:jboner/akka
Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2011-10-20 15:11:34 +02:00
Kjell Winblad
adec2bb509 Merge branch 'master' of https://github.com/jboner/akka 2011-10-20 14:21:41 +02:00
Viktor Klang
e0a7b88fc5 Adding Actor.watch and Actor.unwatch - verrrry niiiice 2011-10-20 13:56:57 +02:00
Roland
25f436d521 add TestKit.fishForMessage 2011-10-20 13:43:24 +02:00
Viktor Klang
6a2f203d26 Rewriting DeathWatchSpec and FSMTransitionSpec to do the startsMonitoring inside the Actor 2011-10-20 11:46:13 +02:00
Viktor Klang
4fc108027e I've stopped hating Jenkins, fixed the pesky elusing DeathWatch bug 2011-10-19 23:21:06 +02:00
Viktor Klang
bf4af15817 Making the DeadLetterActorRef push notifications to the EventHandler 2011-10-19 22:38:35 +02:00
Viktor Klang
57e994386d Making sender always return an ActorRef, which will be the DeadLetterActor if there is no real sender 2011-10-19 22:20:53 +02:00
Viktor Klang
adccc9b89b Adding possibility to specify Actor.address to TypedActor 2011-10-19 18:23:39 +02:00
Viktor Klang
70bacc4c3d Fixing yet another potential race in the DeathWatchSpec 2011-10-19 18:23:23 +02:00
Viktor Klang
83e17aa8ea Removing the 'def config', removing the null check for every message being processed and adding some TODOs 2011-10-19 17:48:27 +02:00
Roland
d3837b9fc3 Introduce parental supervision, BUT TESTS ARE STILL FAILING
- every actor is now supervised, where the root of the tree is
  app.guardian, which has its supervisor field set to a special ActorRef
  obtained from provider.theOneWhoWalksTheBubblesOfSpaceTime (this name
  is meant to indicate that this ref is outside of the universe, cf.
  Michio Kaku)
- changed all tests to obtain specially supervised children (i.e. not
  top-level) via (supervisor ? Props).as[ActorRef].get
- add private[akka] ScalaActorRef.sendSystemMessage for sending
  Supervise()
- everything routing or remote is broken wrt. supervision, as that was
  not “properly” implemented to begin with, will be tackled after
  app/supervision/eventbus/AkkaSpec are stabilized enough
2011-10-19 17:18:50 +02:00
Viktor Klang
f68c170ba8 Removing senderFuture, in preparation for 'sender ! response' 2011-10-19 17:11:09 +02:00
Viktor Klang
77dc9e9c35 #1299 - Removing reply and tryReply, preparing the way for 'sender ! response' 2011-10-19 16:59:47 +02:00
Jonas Bonér
c8215dfd54 Added Gossip messages and management to remote protocol. Various refactorings and improvements of remoting layer.
Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2011-10-19 14:45:24 +02:00
Viktor Klang
2d4251fcee Fixing a race in DeathWatchSpec 2011-10-19 14:26:53 +02:00
Viktor Klang
0dc3c5ad3d Removing receiver from Envelope and switch to use the Mailbox.actor instead, this should speed up the BalancingDispatcher by some since it doesn't entail any allocations in adopting a message 2011-10-19 13:19:44 +02:00
Jonas Bonér
2fcafb205d Changed API in VectorClock and added references in scaladoc.
Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2011-10-19 12:22:22 +02:00
Roland
25e8eb1422 teach new tricks to old FaultHandlingStrategy
- Escalate explicitly does the previous non-handled case
- Restart does the obvious
- Stop just terminates the child (useful for
  ActorInitializationException or “temporary” actors)
- Resume directly resumes the child (immortal actors)
- trapExit list replaced by Decider (total function cause=>action)
- there are factories which accept (most of) the old inputs
- can build a sorted list of (cause, action)-pairs to make a Decider
  which picks the action for the most specific enclosing cause type

Also add DeathPactException for case of unhandled Terminated message.
2011-10-19 11:36:34 +02:00
Roland
10c87d5832 split out fault handling stuff from ActorCell.scala to
FaultHandling.scala
2011-10-19 11:36:06 +02:00
Viktor Klang
bde3969f65 #1297 - Fixing two tests that have been failing on Jenkins but working everywhere else 2011-10-19 11:01:00 +02:00
Viktor Klang
51ac8b1368 Merge branch 'master' of github.com:jboner/akka 2011-10-19 10:10:18 +02:00
Viktor Klang
7d879944ce #1210 - fixing typo 2011-10-19 10:10:03 +02:00
Roland
5c823ad50d replace ConcurrentLinkedQueue with single-linked list for Mailbox.systemQueue
cost zero when empty, non-blocking, shave off 84 bytes per actor
2011-10-18 21:21:19 +02:00
Viktor Klang
01efcd7b50 Removing ActorCell.ref (use ActorCell.self instead), introducing Props.randomAddress which will use the toString of the uuid of the actor ref as address, bypassing deployer for actors with 'randomAddress' since it isn't possible to know what the address will be anyway, removing Address.validate since it serves no useful purpose, removing guard.withGuard in MessageDispatcher in favor of the less costly lock try-finally unlock strategy 2011-10-18 19:14:42 +02:00
Viktor Klang
474787a81d Renaming createActor to actorOf 2011-10-18 17:56:23 +02:00
Viktor Klang
3f258f8b63 Merge branch 'master' of github.com:jboner/akka 2011-10-18 17:00:11 +02:00
Viktor Klang
6150beb333 Pushing the memory per actor down to 464 bytes. Returning None for the Deploy if there is no config 2011-10-18 16:59:57 +02:00