Commit graph

37 commits

Author SHA1 Message Date
Roland
a747ef7856 Merge remote branch 'origin/master' into logging
BalancingDispatcherModelSpec is currently broken, leaves count==1 in
wavesOfActors test, committed anyway in order to check out where it
broke before this merge
2011-11-09 14:56:05 +01:00
Viktor Klang
1b730b5c82 Removing Channel(s), tryTell etc, everything compiles but all tests are semibroken 2011-10-31 16:09:51 +01:00
Roland
f46c6dc533 introducing: MainBus feat. LoggingBus
most tests passing, everything compiling, but docs not updated and nasty
thread-leak preventing me from running the whole test-suite (which is
the reason for this commit: I want to chase down that one first).

- the app.mainbus is classified by Class[_] (currently lookup, will
  possibly change to sub-class-aware) and accepts AnyRef messages
- LoggingBus handles akka.event-handlers from config specially:
  + start them as system services, supervised by SystemGuardian
  + keep their subscriptions in sync when logLevel_= is called
  + send them InitializeLogger(bus) message before subscribing them (so
    they can register for extras like Mute/UnMute)
- two-phased start-up: first phase with actor-less stdout logging, then
  subscription of config loggers, then remove stdout logger (logLevels
  configurable separately)
- MainBusReaper watches registered receivers and unsubscribes them upon
  death (started in phase 2)
- logger factory on Logging object, needs app/bus and log source;
  default instance in app.log
2011-10-27 12:36:22 +02:00
Roland
3b62873e2c fix CallingThreadDispatcher’s assumption of mailbox type
- usually it’s a CallingThreadMailbox, but
- it is swapped out for deadLetter upon stop()
- so use Option[CallingThreadMailbox]
2011-10-26 14:20:02 +02:00
Roland
6bcdba40c0 fix InterruptedException handling in CallingThreadDispatcher
instead of just re-setting the flag upon swallowed exception, clear the
flag when fully done and re-throw last swallowed IE.
2011-10-25 15:07:20 +02:00
Roland
fc8ab7dad8 fix CallingThreadDispatcher and re-enable its test 2011-10-21 18:47:44 +02:00
Viktor Klang
0dc3c5ad3d Removing receiver from Envelope and switch to use the Mailbox.actor instead, this should speed up the BalancingDispatcher by some since it doesn't entail any allocations in adopting a message 2011-10-19 13:19:44 +02:00
Roland
183dfb4d7f remove SystemEnvelope
- channel field was always set to NullChannel and not used
- receiver field is better put into the Mailbox, because there it takes
  space only once per actor
- leaves only the bare SystemMessage to be queued
2011-10-18 16:44:35 +02:00
Roland
85b7accfd4 make EventHandler non-global
- add Logging trait for nicer interface
- add EventHandlerLogging class for offering the nice interface from
  app.log
- add eventHandler instance to app and use that for all internal logging
  (this means that some places (dispatchers, remoting) were infiltrated
  by app just to do logging, but I think we'll need app in there soon
  enough for other reasons)
2011-10-13 13:21:59 +02:00
Viktor Klang
1edd52c691 Rewriting so that the termination flag is on the mailbox instead of the ActorCell 2011-09-23 13:14:17 +02:00
Viktor Klang
1662d25944 Rewriting the Balancing dispatcher 2011-09-23 09:33:53 +02:00
Viktor Klang
3d12e47e7d Decoupling system message implementation details from the Mailbox 2011-09-21 16:27:31 +02:00
Roland
7c63f94169 Refactor Mailbox handling
- rename MessageInvocation to Envelope (same for System...)
- rename MessageQueue to Mailbox and include ExecutableMailbox code
- make MailboxType act as factory, so users can provide their own
- properly type mailbox field as Mailbox everywhere
- adapt CallingThreadDispatcher and some tests
- create DeadletterMailbox and use it to replace actor’s mailbox on
  terminate()
2011-09-21 15:16:14 +02:00
Roland
95b42d8c5b fix some of the immediate issues, especially those hindering debugging 2011-09-21 08:25:08 +02:00
Viktor Klang
9007b6e847 Almost there... ActorRefSpec still has a failing test 2011-09-20 18:34:21 +02:00
Peter Vlugter
48deb311fc Rename ActorInstance to ActorCell 2011-09-20 15:45:43 +02:00
Peter Vlugter
b96f3d9260 Initial breakout of ActorInstance. See #1195 2011-09-15 09:54:40 +02:00
Viktor Klang
548ba08cb5 #1145 - Changing private[akka] to protected[akka] in MessageDispatcher so that inheriting classes can access those methods 2011-08-30 15:50:52 +02:00
Viktor Klang
c7d58c600b Adding initial support for Props 2011-08-26 17:25:18 +02:00
Derek Williams
da987138dd Partial fix for ticket #1054: execute callbacks in dispatcher 2011-07-26 22:23:16 -06:00
Peter Vlugter
f406cd98e0 Add abstract method for dispatcher name 2011-07-25 13:53:25 +12:00
Viktor Klang
9d71be7778 Updating copyright section to Typesafe Inc. etc 2011-07-14 16:03:08 +02:00
Viktor Klang
e9f498a1df Unbreaking the build, adding missing file to checkin, I apologize for the inconvenience 2011-07-14 11:26:38 +02:00
Roland
ca592ef1b4 Merge branch 'master' of github.com:jboner/akka
Conflicts:
	akka-actor/src/main/scala/akka/actor/Actor.scala
	akka-actor/src/main/scala/akka/actor/ActorRef.scala
	akka-actor/src/main/scala/akka/actor/TypedActor.scala
	akka-cluster/src/main/scala/akka/cluster/ClusterActorRef.scala
	akka-cluster/src/main/scala/akka/cluster/ReplicatedClusterRef.scala
	akka-durable-mailboxes/akka-mailboxes-common/src/main/scala/akka/actor/mailbox/DurableDispatcher.scala
	akka-testkit/src/test/scala/akka/testkit/TestActorRefSpec.scala
	akka-tutorials/akka-tutorial-second/src/main/java/akka/tutorial/java/second/Pi.java
2011-06-14 00:19:54 +02:00
Roland
7712c20620 unify sender/senderFuture into channel (++)
(squashed merge from the various bits and pieces already part of
release-1.2, everything related to Channel & Future)
2011-06-13 22:36:46 +02:00
Viktor Klang
417fcc779d Adding support for mailboxIsEmpty on MessageDispatcher and removing getMailboxSize and mailboxSize from ActorRef, use actorref.dispatcher.mailboxSize(actorref) and actorref.dispatcher.mailboxIsEmpty(actorref) 2011-06-07 13:23:24 -05:00
Roland
a48f6fdf90 add copyright headers 2011-05-19 21:34:21 +02:00
Jonas Bonér
a7311c83e6 Added Scalariform sbt plugin which formats code on each compile. Also checking in reformatted code 2011-05-18 17:25:30 +02:00
Patrik Nordwall
6576cd51e9 Scala style fixes, added parens for side effecting shutdown methods 2011-04-29 10:20:16 +02:00
Derek Williams
485013a353 Dispatcher executed Future will be cleaned up even after expiring 2011-04-27 20:45:39 -06:00
Roland Kuhn
9c539e96fe add TestActorRef
- add adaptation of ActorRefSpec test suite
- add some more specific tests
2011-04-16 22:20:04 +02:00
Patrik Nordwall
d4510831f3 fixed warnings, error -> sys.error 2011-04-08 14:43:15 +02:00
Jonas Bonér
6429086b51 Moved EventHandler to 'akka.event' plus added 'error' method without exception param 2011-03-23 15:12:09 +01:00
Roland Kuhn
06049642d5 Merge branch 'wip-CallingThreadDispatcher'
Conflicts:
	akka-actor/src/test/scala/akka/dispatch/ActorModelSpec.scala
	project/build/AkkaProject.scala
both resolved by "union" approach

- change wavesOfActors test for CTD: scheduling SHUTDOWN 10000 times does not
  work so well...
- add executeFuture with trivial implementation, TBC
2011-03-17 22:18:39 +01:00
Roland Kuhn
2693a35eac add locking to CTD-mbox
Up to now it relied on the ActorRef's lock, but that has the side effect that a
large time may pass between the suspend test and the actual execution. With
this lock in place, the ActorRef lock should never block and the time between
suspend and the last actor execution is shortened to some cycles (modulo GC).
2011-03-06 22:45:44 +01:00
Roland Kuhn
2deb47f8fa add test to ActorModelSpec
dispatcherShouldHandleQueueingFromMultipleThreads tests for possible race
conditions in prohibiting multiple threads running the same actor concurrently
2011-03-06 21:53:09 +01:00
Roland Kuhn
50b2c14235 create akka-testkit subproject
- modify AkkaProject.scala
- move CallingThreadDispatcher & Spec and TestKit into akka-testkit
- update FSMTimingSpec accordingly
2011-03-05 14:36:08 +01:00
Renamed from akka-actor/src/main/scala/akka/dispatch/CallingThreadDispatcher.scala (Browse further)