Commit graph

642 commits

Author SHA1 Message Date
Viktor Klang
3b1330c6d7 Tests are green with new Futures, consider this a half-way-there marker 2011-12-11 00:40:52 +01:00
viktorklang
b4f486667f Merge pull request #142 from jboner/wip-1447-actor-context-not-serializable-√
Making sure that ActorCell isn't serializable
2011-12-08 08:45:34 -08:00
Viktor Klang
3b5d45feac Minor corrections after review 2011-12-08 17:45:02 +01:00
Viktor Klang
712805baec Making sure that ActorCell isn't serializable 2011-12-08 16:07:03 +01:00
Viktor Klang
6cdb0126ad Removing HotSwap and revertHotSwap 2011-12-08 14:44:18 +01:00
Roland
5fc9eb2061 fix failing ActorLookupSpec: implied synchronicity in AskActorRef.whenDone which does not exist 2011-12-07 15:01:58 +01:00
viktorklang
bf3ce9bb87 Merge pull request #138 from jboner/wip-reset_behaviors_on_restart
#1429 - reverting hotswap on restart and termination
2011-12-07 05:23:00 -08:00
Patrik Nordwall
2721a879c2 Use Config in benchmarks 2011-12-07 14:08:20 +01:00
Viktor Klang
cde4576cc7 #1429 - reverting hotswap on restart and termination 2011-12-07 13:04:44 +01:00
Roland
75c8ac33b4 make next state’s data available in onTransition blocks, fixes #1422
cherry-picked from release-1.3
2011-12-07 11:59:04 +01:00
Roland
a0a44abe0d add and verify Java API for actorFor/ActorPath, fixes #1343 2011-12-07 11:42:44 +01:00
Patrik Nordwall
56dc18106b ActorContext instead of ActorRef in HotSwap code parameter. See #1441 2011-12-07 11:25:35 +01:00
Patrik Nordwall
f7d6393027 Removed actorOf methods from AkkaSpec. See #1439 2011-12-07 11:10:54 +01:00
Patrik Nordwall
9c73c8eac3 Merge branch 'master' into wip-1377-context-patriknw 2011-12-07 10:08:17 +01:00
Patrik Nordwall
1402c7692e Minor fixes from review comments. See #1377 2011-12-07 10:07:46 +01:00
Roland
0f922a39ab fix ordering issue in ActorLookupSpec
There is no guarantee concerning the order in which children are
traversed during an ActorSelection send operation.
2011-12-07 08:46:40 +01:00
Patrik Nordwall
1a93ddb7c0 Merge branch 'master' into wip-1377-context-patriknw 2011-12-07 08:07:58 +01:00
Patrik Nordwall
bfa14a692c Merge branch 'master' into wip-1377-context-patriknw
Conflicts:
	akka-actor/src/main/scala/akka/actor/ActorCell.scala
	akka-actor/src/main/scala/akka/actor/ActorRef.scala
	akka-actor/src/main/scala/akka/dispatch/AbstractDispatcher.scala
	akka-actor/src/main/scala/akka/event/EventStream.scala
	akka-tutorials/akka-tutorial-first/src/main/java/akka/tutorial/first/java/Pi.java
	akka-tutorials/akka-tutorial-first/src/main/scala/Pi.scala
2011-12-07 07:49:34 +01:00
Jonas Bonér
f7f36ac98c Merge branch 'master' of github.com:jboner/akka
Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2011-12-06 17:29:21 +01:00
Jonas Bonér
05da3f3321 Minor formatting, docs and logging edits.
Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2011-12-06 15:27:10 +01:00
Patrik Nordwall
7595e52bc9 Renamed startsWatching to watch, and stopsWatching to unwatch 2011-12-06 09:59:52 +01:00
Patrik Nordwall
3204269f6a Cleanup of methods in Actor and ActorContext trait. See #1377
* 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
2011-12-06 09:50:16 +01:00
Roland
9d7597c728 Merge branch master into wip-ActorPath-rk
Had to make Davy Jones a bit more robust, i.e. put him into a different
system to guarantee survival until all messages are delivered.
2011-12-05 22:46:34 +01:00
Roland
0b5f8b083d rename ActorPath.{pathElemens => elements} 2011-12-05 15:57:43 +01:00
Roland
eeca88d674 add test for “unorderly” shutdown of ActorSystem by PoisonPill
- 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!
2011-12-05 15:18:22 +01:00
Roland
236ce1557c fix visibility of top-level actors after creation
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
2011-12-03 22:25:18 +01:00
Roland
4c1d722398 fix bug in ActorRef.stop() implementation
- 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.
2011-12-03 18:53:04 +01:00
Roland
3d0bb8b415 implement ActorSeletion and document ActorRefFactory
- implementation of this cool feature is now astonishingly simple:
  context.actorSelection("child/*") ! msg
- docs propagate to ActorSystem/ActorContext
2011-12-03 17:39:52 +01:00
Roland
79e5c5d0d1 implement coherent actorFor look-up
- 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.
2011-12-03 12:23:23 +01:00
Viktor Klang
b2ecad1327 Merge branch 'master' of github.com:jboner/akka 2011-12-02 17:47:22 +01:00
Viktor Klang
93d093e87a Commenting out the ForkJoin stuff until I've cleared some bits with Doug Lea 2011-12-02 17:29:47 +01:00
Patrik Nordwall
1f665ab4c6 Changed signatures of Scheduler for better api of by-name blocks 2011-12-02 17:13:46 +01:00
Roland
e38cd19af9 Merge branch 'master' into wip-ActorPath-rk 2011-12-02 13:31:48 +01:00
Roland
cf020d708a rename top-level paths as per Jonas recommendation
/user
/system
/null
/temp
/remote
/service

multi-jvm tests are disabled for the time being until remote look-up has
been really implemented
2011-12-02 12:24:47 +01:00
Patrik Nordwall
b488d70f54 Fixed several memory and thread leaks. See #1404
* 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.
2011-12-02 09:48:21 +01:00
Patrik Nordwall
82bbca43ab Merge branch 'master' into wip-1378-fixme-patriknw
Conflicts:
	akka-actor/src/main/scala/akka/actor/ActorRef.scala
	akka-remote/src/main/scala/akka/remote/RemoteActorRefProvider.scala
	akka-remote/src/main/scala/akka/remote/netty/NettyRemoteSupport.scala
2011-12-02 09:03:03 +01:00
Patrik Nordwall
66bf11681c Changed config.toValue -> config.root 2011-12-02 08:51:51 +01:00
Patrik Nordwall
c5a367ad54 Merge branch 'master' into wip-config-patriknw 2011-12-02 08:49:34 +01:00
Viktor Klang
fcc6169ede Removing the final usages of startsWatching/stopsWatching 2011-12-02 01:00:55 +01:00
Viktor Klang
54e2e9a357 Switching more test code to use watch instead of startsWatching 2011-12-02 00:25:17 +01:00
Viktor Klang
571d856f54 Removing one use-site of startsWatching 2011-12-01 23:52:16 +01:00
Viktor Klang
ef27f865d4 Adding support for ForkJoinPoolConfig so you can use ForkJoin 2011-12-01 17:03:30 +01:00
Viktor Klang
e3e694d1dc Tweaking the consistency spec for using more cores 2011-12-01 17:02:30 +01:00
Roland
6b9cdc5f65 fix ActorRef serialization
- 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
2011-12-01 14:31:02 +01:00
Viktor Klang
e590a4877a Making the ConsistencySpec a tad more awesomized 2011-12-01 10:27:28 +01:00
Roland
b65799c7f3 remove ActorRef.address & ActorRef.name
- address => path.toString
- name => path.name
- forward hashCode, equals and compareTo to path
- implement recursive efficient ActorPath.compareTo
- fix ActorPath.equals endless recursion
- remove wrong warning in ActorCell.systemInvoke.supervise()
2011-11-30 23:30:56 +01:00
Roland
7e4333a612 fix actor creation with duplicate name within same message invocation
- 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
2011-11-30 22:19:48 +01:00
Viktor Klang
070d446165 #1417 - Added a test to attempt to statistically verify memory consistency for actors 2011-11-30 10:52:51 +01:00
Patrik Nordwall
80ac1737cd First walk throught of FIXME. See #1378
* 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
2011-11-30 10:48:26 +01:00
Roland
073c3c012b fix EventStreamSpec by adding Logging extension
- used only to keep the uniquifying logger counter per-ActorSystem
- add convenience-class for writing an extension with only two lines
  overhead (Java: three)!
2011-11-29 23:00:57 +01:00