Commit graph

8055 commits

Author SHA1 Message Date
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
eb61173ff9 API doc clarification of context and getContext 2011-12-07 10:47:07 +01:00
patriknw
87fc7ea536 Merge pull request #136 from jboner/wip-1377-context-patriknw
Cleanup of methods in Actor and ActorContext trait. See #1377
2011-12-07 01:10:27 -08: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
Roland
d8ede288d7 improve ScalaDoc of actorOf methods (esp. their blocking on ActorSystem) 2011-12-06 23:09:29 +01:00
Roland
c4ed57100e make Jenkins wait for Davy Jones
- AkkaSpecSpec failed with nothing in the locker, but only on Jenkins
- cause: Davy Jones doesn’t get a chance to run because nobody actually
  waits for his processing
- thus, give him permission to leave this world and have him confirm
  that
2011-12-06 22:50:19 +01:00
Roland
a1d8f30669 fix bug in creating anonymous actors
- when no name was given, it resulted in a simple call to the provider
- which is completely the wrong thing to do in case of ActorSystem
- so, introduce CreateRandomNameChild op for guardians and use that
2011-12-06 21:34:29 +01:00
Roland
831b3272ad add min/max bounds on absolute number of threads for dispatcher
The reason for the previously failing test case was that Jenkins has
only two (logical) cores and the test config sets the
core-pool-size-factor to 2, meaning four threads. This is not enough to
have four Futures waiting (as per the test) and one actor which actually
does the work (the guardian in this case). Hence, make it so that
core-pool-size-min gives the absolute minimum and set the default of
that to eight.

While doing so I cleaned up the MessageDispatcherConfigurator to not use
HOF since now configuration items are not optional anymore, yielding a
flow which is much more readily understandable.
2011-12-06 20:39:26 +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
Roland
d6fc97c48d introduce akka.actor.creation-timeout to make Jenkins happy
- I had reused akka.actor.timeout for ActorSystem.actorOf calls (which
  “ask” the guardian to create the actor), but 5sec proved too short for
  Jenkins
- CreationTimeout defaults to 30sec now, let’s hope Jenkins is not
  slower than _that_.
2011-12-06 16:36:49 +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
Roland
66c1d62a51 Merge branch 'wip-ActorPath-rk' 2011-12-06 15:12:09 +01:00
Jonas Bonér
29dd02bf9b Merge branch 'master' of github.com:jboner/akka 2011-12-06 14:54:06 +01:00
Viktor Klang
96182885c2 #1437 - Replacing self with the DeadLetterActorRef when the ActorCell is shut down, this to direct captured self references to the DLQ 2011-12-06 11:28:29 +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
b2a8e4ccae document requirements of our Scheduler service 2011-12-06 09:27:32 +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
82dc4d67c9 fix remaining review comments 2011-12-05 21:43:58 +01:00
Roland
cdc5492101 correct spelling of Davy Jones 2011-12-05 21:03:05 +01:00
Roland
c0c9487451 make testActor spew out uncollected messages after test end
(so you don’t need expectNoMsg after tests)
2011-12-05 19:03:01 +01:00
Roland
d2cffe7e33 do not use the only two special characters in Helpers.base64
If automatically generated names contains * and ?, they might do
something strange when being looked up. There was no real issue with our
current tests, but I just want to avoid the issue.
2011-12-05 18:23:49 +01:00
Roland
3c06992d2e incorporate review comments 2011-12-05 17:31:54 +01:00
Roland
13eb1b6c8b replace @volatile for childrenRefs with mailbox status read for memory consistency 2011-12-05 16:18:56 +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
Jonas Bonér
37f21c7d9b Fixed string concatenation error 2011-12-05 14:02:12 +01:00
Viktor Klang
5530c4cbdb Unborking master 2011-12-05 14:01:03 +01:00
Jonas Bonér
5f91bf5c7d Added disabled GossipMembershipMultiJVMSpec.
Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2011-12-05 12:34:17 +01:00
Jonas Bonér
d12a33235f Fixed wrong help text in exception. Fixes #1431.
Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2011-12-05 12:31:56 +01:00
Jonas Bonér
d6d9cedf0e Merge branch 'master' of github.com:jboner/akka 2011-12-05 11:14:13 +01:00
Jonas Bonér
ddf3a36673 Added JSON file for ls.implicit.ly 2011-12-05 11:14:05 +01:00
Patrik Nordwall
c8a1a96310 Updated config documentation 2011-12-05 10:41:36 +01:00
Roland
829c67f60c fix one leak in RoutedActorRef (didn’t properly say good-bye) 2011-12-03 23:14:52 +01:00
Roland
ea4d30e732 annotate my new FIXMEs with RK 2011-12-03 22:42:13 +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
1755aedb58 make scheduler shutdown more stringent
- run closeScheduler upon ActorSystem termination (directly)
- this will execute all outstanding tasks (dispatcher shutdowns have
  been queued already, because the last actor has already exited)
- further use of the scheduler (e.g. from tasks just being run) results
  in IllegalStateException
- catch such exceptions in DefaultPromise&MessageDispatcher in case of
  self-rescheduling tasks and execute final action immediately
- also silently stop recurring tasks
2011-12-03 21:26:32 +01:00
Roland
ed4e302d2a make HashedWheelTimer reliably shutdown
- make “shutdown” a normal boolean
- use lock.readLock() whenever reading “shutdown”
- use lock.writeLock() when setting it to true
- throw IllegalStateException whenever no-queue
2011-12-03 21:17:22 +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
95791ce4c5 #1424 - RemoteSupport is now instantiated from the config, so now anyone can write their own Akka transport layer for remote actors 2011-12-02 18:08:38 +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