Commit graph

110 commits

Author SHA1 Message Date
Björn Antonsson
aa2de6aacd Fixed RoutingSpec test. See #2268 2012-06-26 10:34:09 +02:00
Roland
b60210362e make system.actorOf() non-blocking (and working), see #2031
- introducing RepointableActorRef, which starts out with an
  UnstartedActorCell which can cheaply be created; the Supervise()
  message will trigger child.activate() in the supervisor, which means
  that the actual creation (now with normal ActorCell) happens exactly
  in the right place and with the right semantics. Messages which were
  enqueued to the dummy cell are transferred atomically into the
  ActorCell (using normal .tell()), so message sends keep working
  exactly as they used to
- this enables getting rid of the brittle synchronization around
  RoutedActorRef by replacing that one with a RepointableActorRef
  subclass which creates RoutedActorCells upon activate(), with the nice
  benefit that there is no hurry then to get it right because the new
  cell is constructed “on the side”

misc fixes:

- InvalidMessageException is now actually enforced when trying to send
  “null”
- Mailboxes may be created without having an ActorCell, which can come
  in handy later, because the cell is only needed when this mailbox is
  going to be scheduled on some executor
- remove occurrences of Props(), which is equivalent to Props[Nothing],
  which is equivalent to «bug»
- add test case which verifies that context.actorOf is still synchronous
- plus all the stuff I have forgotten.
2012-06-13 17:57:56 +02:00
Viktor Klang
c990fee724 Switching to the appropriate check for confirmed existence 2012-06-04 13:46:29 +02:00
Viktor Klang
17ee47079a Incorporating Roland's feedback 2012-06-02 14:49:28 +02:00
Viktor Klang
96f264e842 Initial stab at DeathWatch 2.0, tests don't pass just yet 2012-05-28 16:49:49 +02:00
Viktor Klang
95db4bfd37 Moving out ConfigurationException from akka.config to akka 2012-05-16 17:04:13 +02:00
Roland
afd81d8506 Revert "closes #2019: Use parentheses for arity-0 methods which are not referentially transparent"
This reverts commit 8dbfbbe966.
2012-05-03 21:14:47 +02:00
Heiko Seeberger
8dbfbbe966 closes #2019: Use parentheses for arity-0 methods which are not referentially transparent 2012-04-24 16:38:21 +02:00
Roland
64b523638e rework childrenRefs to make context.stop(child) fully asynchronous
- 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 ;-)
2012-02-29 21:10:31 +01:00
Roland
b5826f9bd9 make LoggingReceiveSpec more robust 2012-02-18 22:32:41 +01:00
Roland
0f48b9f3eb make supervisorStrategy of Router configurable, see #1835
- also do not scrap router’s children upon restart
- and add docs and tests
2012-02-18 22:15:39 +01:00
Roland
36247b10fe fix some more comments and make Router dispatcher configurable
- assert locking balance when using Unsafe.instance.monitorExit
- add RouterConfig.routerDispatcher
- re-enable “busy” resizer test after switching to BalancingDispatcher
- document resizer asynchronicity and how to configure dispatchers
2012-02-10 14:13:40 +01:00
Roland
34a0f005b1 Merge branch 'master' into wip-1581-patterns-ask 2012-01-20 19:29:17 +01:00
Viktor Klang
8dfe619140 #1703 & #1693 - moving daemonicity to one place, and in doing so creating a thread factory in ActorSystem 2012-01-20 12:30:19 +01:00
Viktor Klang
149fbea5a7 Updating Copyright as per #1660 2012-01-19 18:21:06 +01:00
Roland
1daaee98aa Merge remote-tracking branch 'origin/master' into wip-1581-patterns-ask 2012-01-18 14:20:13 +01:00
Roland
2bed2cb954 move everything into package akka.pattern 2012-01-18 10:18:51 +01:00
Patrik Nordwall
e7a0247c0d Handle remote routers transparently. See #1606
* RemoteRouterConfig wrapper with RemoteRouteeProvider instead if fixed remote routers.
* Had to refactor and introduce RouteeProvider for different implementations of how to create routees.
* Works with Resizer also.
* Added some tests.
2012-01-17 09:11:45 +01:00
Patrik Nordwall
8d10d44929 Support config of custom router. See #1623 2012-01-12 16:37:08 +01:00
Patrik Nordwall
2399f02531 Improvements based on feedback. See #1619 2012-01-12 09:53:53 +01:00
Patrik Nordwall
6a12fb7876 Implemented SmallestMailboxRouter. See #1619 2012-01-11 14:06:47 +01:00
Patrik Nordwall
409cbaf8e2 Removed exposure of RoutedActorRef in RouterConfig. See #1618 2012-01-11 11:30:32 +01:00
Patrik Nordwall
762a6017e9 Verify config override of router nr-of-instances. See #1607
* It wasn't a bug. I think the confusion came from config without 'router' defined.
* Added test
* Added some clarification to docs
2012-01-10 17:50:17 +01:00
Patrik Nordwall
ed2b65c402 DOC: Routing (Java). See #1600 2012-01-05 17:59:19 +01:00
Nikolay Botev
ce1d2f4721 akka.patterns.ask everywhere 2012-01-01 22:23:19 -08:00
Viktor Klang
88d2427b7f Fixing race in ActorTimeoutSpec and a shadowing import in RoutingSpec 2011-12-30 11:25:39 +01:00
Roland
c4f3a93268 implement routing.FromConfig, see #1554 2011-12-29 17:23:35 +01:00
Henrik Engstrom
1a8e755738 Minor updates after further feedback. See #1529 2011-12-21 11:46:39 +01:00
Henrik Engstrom
dac0beb01b Updates based on feedback - use of abstract member variables specific to the router type. See #1529 2011-12-21 10:03:26 +01:00
Henrik Engstrom
0dc161c800 Initial take on removing hardcoded value from SGFCR. See #1529 2011-12-20 19:57:42 +01:00
Henrik Engstrom
c92f3c5ca2 Merge branch 'master' into 1495-routees-message-he
Conflicts:
	akka-actor/src/main/scala/akka/routing/Routing.scala
2011-12-20 11:18:37 +01:00
Henrik Engstrom
f67a50074b Removed racy test. See #1495 2011-12-19 18:35:48 +01:00
Henrik Engstrom
5aa4784ea2 Updated code after feedback; the actual ActorRef's are returned instead of the name of them. See #1495 2011-12-19 16:35:35 +01:00
Viktor Klang
c904fd3913 Making TestLatch Awaitable and fixing tons of tests 2011-12-19 15:05:33 +01:00
Henrik Engstrom
3ff779cabd Added functionality for a router client to retrieve the current routees of that router. See #1495 2011-12-19 14:20:33 +01:00
Viktor Klang
42e8a4559e #1496 - Rename 'targets' to 'routees' 2011-12-17 16:33:29 +01:00
Henrik Engstrom
95574dab7e Fixed failing test class. 2011-12-15 21:24:10 +01:00
Henrik Engstrom
536659d64c Fixed last(?) comments on the pull request. Fixes #1063 2011-12-15 20:42:51 +01:00
Henrik Engstrom
d68777e76e Updated after feedback. See #1063 2011-12-15 18:21:56 +01:00
Henrik Engstrom
41ce42c8f7 Upgraded routing documentation to Akka 2.0. See #1063 2011-12-15 16:36:04 +01:00
Jonas Bonér
b4f1978b37 Merge remote-tracking branch 'origin/wip-simplify-configuring-new-router-in-props-jboner'
Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2011-12-15 10:32:31 +01:00
Viktor Klang
e959493e12 Enormous merge with master which probably led to the indirect unfortunate deaths of several kittens 2011-12-14 17:36:39 +01:00
Jonas Bonér
80600abc33 Added 'withRouter[TYPE]' to 'Props'.
Added docs (Scala and Java) and (code for the docs) for 'Props'.
Renamed UntypedActorTestBase to UntypedActorDocTestBase.

Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2011-12-14 14:05:44 +01:00
Roland
cb85778b12 remove ActorRef.stop()
- replace ActorRef.stop() by ActorRefFactory.stop(child) everywhere
- ActorCell “optimizes” this to remove the child from its childrenRefs
  in order to allow immediate recycling of the name
- the lost soul must have a place, for which the Locker has been
  created, where Davy Jones will happily rebind the soul to his ship
  (i.e. set “parent” to the locker to avoid mem leak) and periodically
  revisit it (.stop(), in case of that being lost in comm failure,
  similar .watch() to re-check liveness)
2011-12-14 00:10:53 +01:00
Roland
92e7693203 Merge remote-tracking branch 'origin/master' into wip-remote-supervision-rk 2011-12-13 16:59:43 +01:00
Roland
134fac4bfe make routers monitor their children 2011-12-13 16:05:56 +01:00
Jonas Bonér
c9b787f029 Removed all 'actorOf' methods that does not take a 'Props', and changed all callers to use 'actorOf(Props(..))'
Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2011-12-13 14:09:40 +01:00
Roland
4bd9f6ae1a rename Props.withRouting to .withRouter 2011-12-13 11:32:24 +01:00
Roland
d1a26a9e28 implement remote routers
- 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 ...
2011-12-13 01:29:05 +01:00
Roland
0a7e5fe296 wrap up local routing
- 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
2011-12-12 23:34:52 +01:00