- replace TreeMap with custom ChildrenContainer, which has three
implementations: empty, normal and “terminating” (i.e. waiting for
some child to terminate)
- split recreate() in the same way as terminate(), so that there is a
phase during which the suspended actor waits for termination of all
children which were stopped in preRestart
- do not null out “actor” in ActorCell during restart, because we do
need the supervisionStrategy and nulling it out does not buy us much
in this case anyway
- provide new ActorContext.suspendForChildTermination(), which enters
limbo for as long there are outstanding termination requests; this
enables code which is very similar to previously (half-working) setups
with “synchronous” context.stop(child)
docs are still missing, plus a little polishing here and there; oh, and
before I forget: ActorCell NOW is 64 bytes again ;-)
- PropertyMaster is the only place in Akka which calls
ClassLoader.getClass (apart from kernel, which might be special)
- all PropertyMaster methods (there are only three) take a ClassManifest
of what is to be constructed, and they verify that the obtained object
is actually compatible with the required type
Other stuff:
- noticed that I had forgotten to change to ExtendedActorSystem when
constructing Extensions by ExtensionKey (damn you, reflection!)
- moved Serializer.currentSystem into JavaSerializer, because that’s the
only one needing it (it’s only used in readResolve() methods)
- Serializers are constructed now with one-arg constructor taking
ExtendedActorSystem (if that exists, otherwise no-arg as before), to
allow JavaSerializer to do its magic; possibly necessary for others as
well
- Removed all Option[ClassLoader] signatures
- made it so that the ActorSystem will try context class loader, then
the class loader which loaded the class actually calling into
ActorSystem.apply, then the loader which loaded ActorSystemImpl
- for the second of the above I added a (reflectively accessed hopefully
safe) facility for getting caller Class[_] objects by using
sun.reflect.Reflection; this is optional an defaults to None, e.g. on
Android, which means that getting the caller’s classloader is done on
a best effort basis (there’s nothing we can do because a StackTrace
does not contain actual Class[_] objects).
- refactored DurableMailbox to contain the owner val and use that
instead of declaring that in all subclasses
- add Deploy to Props, which is used as the basis (overridden by
configuration)
- utilize general mechanism .withFallback (introduced on Deploy,
RouterConfig and Scope)
- actually pass Props over the wire when deploying remotely in order to
retain settings (this was an oversight before)
- write tests for the new functionality
- re-label Client/Server to Inbound/Outbound for netty settings
description
- move to just using exactly one class loader for all reflective
activities of the ActorSystem, which is either the context class
loader or the one which loaded the ActorSystem’s class; document that
putting Akka on boot class path will not work
- be more careful with initializing the Client- and ServerBootstrap
- rename Port to DesiredPortFromConfig to discourage misuse
- write test for NettySettings
- various small fixes
- move all creation of ActorRefs into the ActorRefProvider (deadLetters,
locker)
- rootPath does not contain remote transport address any longer in order
to start the LocalActorRefProvider before the RemoteTransport; the
transport address is inserted during serialization only, which enables
us later to have more than one transport available for one actor
system (maybe even needed for clustering)
- fix inheritance between DeadLetterActorRef and EmptyLocalActorRef
- document some start-up dependencies by reordering constructor code
- fix remote tests which used self.path for identifying remote actors
(since that no longer includes the remote transport address)
- remove ?(msg, timeout), should always use ?(msg)(timeout) because of
Scala’s only Martin-acknowledged design flaw of being able to pass
tuples into single-arg methods without adding another pair of parens
- put a provider into all actor refs, because they all are created by
and associated with one
- treat all terminated refs equally: tell(msg) and return broken promise
- remove Remote, incorporate its few fields into RemoteActorRefProvider
- rename RemoteSupport to RemoteTransport to sync up with conf and
the way we talk about it
- remove LocalAddress/RemoteAddress etc. and just have a final case
class Address(protocol, system, host, port)
- split netty settings out or RemoteSettings into NettySettings
- split out from NettyRemoteSupport.scala: Server.scala, Client.scala,
Settings.scala
plus a few fixes, including using the contextClassLoader when loading
the provider for ActorSystemImpl
- move package objects into their respective package.scala file in the
right directories
- make implicit conversion as well as explicit facility available under
the same name akka.patterns.ask for easy import
- revert the logic to produce the Promise for the PromiseActorRef within
the ActorRefProvider; supporting wrapping of external Promises does
not seem to justify doing needless extra allocations in case of
failure
- add scaladocs
- factor out “def provider” into trait ActorRefWithProvider, as it
didn’t feel right attaching this information “by exception” to
MinimalActorRef
- introduce EmptyLocalActorRef, which is returned for unsuccessful
look-ups of local scope
- this fixes the problem that actors—after their death—can still be
looked up without losing their identity; otherwise behave like
DeadLetterActorRef
- adapt tests accordingly
- make DeathWatchSpec reusable and build remote test from it
- remove several unused imports of LocalActorRef
- use LocalRef/RemoteRef in pattern matches where applicable: these are
marker traits for a ref’s scope; InternalActorRef mandates a scope as
per its self-type
- mostly a matter of putting correct target.nodes URIs into configs and
adding withRouting to Props
- ScatterGather test was wrong to assume equal distribution of replies
from connections; it is random and only the sum should add up
- split out actual routing functionality into *Like traits to be
reusable
- make RemoteRouterConfig which only differs in how remote placement is
initiated
- teach RemoteDeployer how to convert local RouterConfig in case config
key “target.nodes” is set
- IT WORKS! All tests GREEN
- oh, yeah, had to make ActorPath serializable ...
- pull some more generic stuff out of the individual routers, add
factories which take only target lists
- add router parsing to Deployer, removing everything which is not
strictly related to local scope, which left only few things, so move
them to Deployer.scala and delete DeploymentConfig
- fix ConfiguredLocalRoutingSpec to use the new configuration mechanism
and verify that configuration overrides code
- fix DeployerSpec by using (mostly) correct lookup paths and removing
everything which was not local
- change config file layout, removing everything which is not local from
akka-actor/.../reference.conf, putting the remote stuff into the
akka-remote/.../reference.conf (unused as of yet); adapt comments
according to changed functionality
- fixed so that netty pipeline when generating addresses does not need
to know the system name of the connecting client (which might differ
from the local one, of course)
- this entailed differentiating between transport addresses and system
addresses, which I took as an opportunity to separate everything out
properly so that address schemas can easily be made pluggable
- made RemoteSupport generic in the address format it supports
- adapt netty stuff, and made everything else work with the most
generic: ParsedTransportAddress
- did I mention that I statically separated unparsed from parsed
addresses?
- remove unused ActorDeployer trait
- put everything in one class with simple initialization structure and
one protected method to override for adaptations
- adapt RemoteDeployer accordingly
- change “remote” key to directly contain the single remote address,
since there is nothing else to configure
- adapt test cases accordingly