Commit graph

17 commits

Author SHA1 Message Date
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
12b9af25cf #2168 - Exposing more Netty options in remtoe config 2012-06-01 21:29:47 +02:00
Brian Scully
6a415f0e9b * Add Circuit Breaker to akka.pattern for general use. Circuit breaker implementation as described by Michael T. Nygard in Release It!. Fixes #1734
* Uses finite state machine for three states: Closed, Open, Half-Open
    * Closed state allows calls through, and on sequential failures exceeding the max# set - transitions to Open state. Intervening successes cause the failure count to reset to 0
    * Open state throws a CircuitOpenException on every call until the reset timeout is reached which causes a transition to Half-Open state
    * Half-Open state will allow the next single call through, if it succeeds - transition to Closed state, if it fails - transition back to Open state, starting the reset timer again
  * Allow configuration for the call and reset timeouts, as well as the maximum number of sequential failures before opening
  * Supports async or synchronous call protection
  * Callbacks are supported for state entry into Closed, Open, Half-Open.  These are run in the supplied execution context
  * Both thrown exceptions and calls exceeding max call time are considered failures
  * Uses akka scheduler for timer events
  * Integrated into File-Based durable mailbox
  * Sample documented for other durable mailboxes
2012-06-01 08:24:47 -04:00
Patrik Nordwall
0eae9d8d22 Move all doc examples out of the akka-package to avoid use of private APIs. See #2092 2012-05-22 11:37:09 +02:00
Patrik Nordwall
1e82a231c9 Incorporate review feedback. See #2061 2012-05-21 07:46:48 +02:00
Patrik Nordwall
8924080017 Create test-fixture for durable mailboxes. See #2061
* Improved DurableMailboxSpec for stand alone usage
* Changed build to publish DurableMailboxSpec in akka-mailboxes-common-test
* Changed documentation of durable mailboxes and added full example of
  how to implement a durable mailbox, with test
2012-05-15 16:11:00 +02:00
Viktor Klang
572382b220 Removing playMini as to avoid the cyclic dependency, please look at the play-mini docs for examples 2012-02-27 14:02:27 +01:00
Henrik Engstrom
1e879b6d03 Added HTTP docs with a sample application. See #1538 2012-02-12 23:09:47 +01:00
Jonas Bonér
51a218b87f Fixes ticket #1809 - Harmonize configuration option names.
Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2012-02-09 20:40:09 +01:00
Viktor Klang
149fbea5a7 Updating Copyright as per #1660 2012-01-19 18:21:06 +01:00
Patrik Nordwall
c4401f1ca8 Changed so that the configured FQCN of the mailboxType must be a MailboxType, not the Mailbox. See #1458 2011-12-21 19:37:18 +01:00
Patrik Nordwall
f772b0183e Initial commit of dispatcher key refactoring, for review. See #1458
* Changed signatures and constructor of MessageDispatcherConfigurator
* Changed Dispatchers.lookup, keep configurators instead of dispatchers
* Removed most of the Dispatchers.newX methods, newDispatcher is still there because of priority mailbox
* How should we make it easy to configure priority mailbox?
* Changed tons tests
* Documentation and ScalaDoc is not updated yet
* Some tests in ActorModelSpec are temporary ignored due to failure
2011-12-21 13:27:50 +01:00
Patrik Nordwall
5fd40e53ca Updates after feedback 2011-12-20 09:56:29 +01:00
Patrik Nordwall
61813c6635 Make MailboxType implementation configurable. See #1484
* Added mailboxType property to dispatcher config
* Changed durable mailboxes to use this
* Updated docs for durable mailboxes
2011-12-19 21:41:02 +01:00
Henrik Engstrom
419b69438f Added copyright header to all samples in docs. Fixes #1531 2011-12-19 11:07:59 +01:00
Roland
5eedbdd69f rename ActorSystem.stop() to .shutdown() 2011-12-14 01:06:20 +01:00
Patrik Nordwall
eaafed69eb DOC: Update Durable Mailboxes Chapter. See #1472 2011-12-12 11:51:12 +01:00