- 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
- 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
- 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
- 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.
- channel field was always set to NullChannel and not used
- receiver field is better put into the Mailbox, because there it takes
space only once per actor
- leaves only the bare SystemMessage to be queued