* Added JavaActorContext, UntypedActor.getContext
* implicit val context in Actor needs to be implicit to support forward,
it would be nice if it wasn't implicit because now I can't override context
in UntypedActor
* Removed implicit def system in Actor
* Removed implicit def defaultTimeout in Actor
* Removed receiveTimeout, children, dispatcher, become, unbecome, watch,
unwatch in Actor
* Removed corresponding as above from UntypedActor
* Removed implicit from dispatcher in ActorSystem
* Removed implicit def timeout in TypedActor
* Changed receiveTimeout to use Duration (in api)
* Changed many tests and samples to match new api
- uncovered nasty endless loop bug wrt. dead letters and a dead listener
- fixing that bug removed the MainBusReaper (sigh)
- also fix compilation of tutorial-first, but that REALLY needs to be
changed not to create RoutedActorRef using new!
Obtaining an ActorRef means that its path must be found in look-ups.
Since this is tightly coupled to supervision, the plan of managing /user
and /system actors in special ConcurrentHashMaps did not succeed: the
actor might not yet be supervised when the system is stopped, which
would orphan it; or a look-up directly following its creation would
return deadLetters. Since all of this is not desirable, I changed the
strategy to sending the props and name to the respective supervisor, let
it create the child and hand it back, i.e. I’m using ask/get with
ActorTimeout. This is okay since top-level should not be created at MHz
rate (will have to document this, though).
- also fix one expected exception in TypedActorSpec and the names of
configured routers
- it was telling all children to stop(), then waited for the
ChildTerminated messages and finally terminated itself
- this worked fine, except when the stop came from the supervisor, i.e.
the recipient was suspended and did not process the ChildTerminated
- so, as the mirror of Supervise() that it is, I changed
ChildTerminated() to be a system message and instead of stopping
processing normal messages by checking the stopping flag, just suspend
the actor while awaiting the ChildTerminated's to flow in.
- implementation of this cool feature is now astonishingly simple:
context.actorSelection("child/*") ! msg
- docs propagate to ActorSystem/ActorContext
- look-up of all actor paths in the system, even “synthetic” ones like
“/temp”
- look-up by full URI (akka://bla/...), absolute or relative path
- look-up by ActorPath
- look-up by path elements
- look-up relative to context where applicable, supporting ".."
- proper management of AskActorRef
Have a look at ActorLookupSpec to see what it can do.
* Dispatchers need Scheduler to be able to shutdown themselves. Stop Scheduler after dispatchers.
* Changed CallingThreadDispatcher global object to Extension, since it holds map of references to mailboxes. Will be GC:ed when system is GC:ed.
* Made testActor lazy, since it is not used in all tests, and it creates CallingThreadDispatcher.
* Activated some java tests that were not running
* Many tests were not stopping created ActorSystems. VERY IMPORTANT TO STOP ActorSystem in tests. Use AkkaSpec as much as possible.
* Used profiler to verify (and find) dangling ActorSystemImpl and threads from dispatchers.
* FutureSpec creates ForkJoinPool threads that are not cleared, but number of threads don't grow so it's not a problem.
- represent it by SerializedActorRef(path), i.e. only a “tagged” string
- remove serialize/deserialize from ActorRefProvider interface
- adapt test since deadLetters is returned when nothing found instead of
exception
- multi-jvm tests are still broken, but that is due to look-up of remote
actors, which I have just not done yet
- ActorCell will pre-fill the childrenRefs with the reserved name in
order to detect duplicates
- also clean up some test outputs (some ActorSystems forgot to fall back
to testConf so they did not get the TestEventListener anymore)
- fix race in start-up of LoggingReceiveSpec by ignoring messages from
testActor start (never was slow enough on my machine to trigger =>
thank you Jenkins, again!)
- represent actors in logging only by their path, i.e. remote Actor[...]
decoration
- fix automatic naming of AkkaSpec ActorSystems after the true class
name of the test spec
* Fixed obvious
* Created tickets for several, #1408, #1409, #1410, #1412, #1415, 1416, #1418
* Moved LoggingReceive from akka.actor to akka.event
* Touched several of the FIXME to make them visible in code review
- used only to keep the uniquifying logger counter per-ActorSystem
- add convenience-class for writing an extension with only two lines
overhead (Java: three)!