Commit graph

196 commits

Author SHA1 Message Date
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
c059d1bc11 Merge branch 'parental-supervision'
commented out one failing test in LoggingReceiveSpec (known, to be fixed
soon by implementing MainBusLogging)
2011-10-25 12:24:39 +02:00
Viktor Klang
bb0b845607 Preparing to remove channels and ActorPromise etc 2011-10-21 15:51:38 +02:00
Roland
25e8eb1422 teach new tricks to old FaultHandlingStrategy
- Escalate explicitly does the previous non-handled case
- Restart does the obvious
- Stop just terminates the child (useful for
  ActorInitializationException or “temporary” actors)
- Resume directly resumes the child (immortal actors)
- trapExit list replaced by Decider (total function cause=>action)
- there are factories which accept (most of) the old inputs
- can build a sorted list of (cause, action)-pairs to make a Decider
  which picks the action for the most specific enclosing cause type

Also add DeathPactException for case of unhandled Terminated message.
2011-10-19 11:36:34 +02:00
Viktor Klang
050411bf3b Making a Java API for Scheduler (JScheduler) and an abstract class Scheduler that extends it, to make the Scheduler pluggable, moving it into AkkaApplication and migrating the code. 2011-10-17 18:35:36 +02:00
Roland
44b94643e5 Merge with Peter's work (i.e. merging master into tame-globals) 2011-10-13 14:17:07 +02:00
Peter Vlugter
317b8bc03b Merge master into tame-globals branch 2011-10-13 13:41:44 +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
c950679fd8 #1285 - Implementing different internal states for the DefaultPromise 2011-10-12 16:29:33 +02:00
Peter Vlugter
3aadcd7645 Update stm module to work with AkkaApplication 2011-10-07 15:22:36 +02:00
Roland
2381ec54d0 introduce AkkaApplication
- remove global Config
- pull everything which depended on it into new AkkaApplication
- leave EventHandler alone for the moment: that evil sucker gets his
  very own AkkaApplication("akka-reference.conf") until we have settled
  on an acceptable logging API without globals
- make akka-actor and akka-testkit compile
- TestKit uses implicit AkkaApplication passing for maximum convenience
- Actor object nearly completely removed, actor creation possible via
  ActorRefFactory interface which is implemented by AkkaApplication and
  ActorContext
- serialization of ActorRef is probably broken, and so is the reflective
  RemoteSupport (now needs AkkaApplication constructor arg)
- everything else is still broken, including akka-actor-tests, so this
  is of course all not runtime-tested
2011-10-06 21:19:46 +02:00
Viktor Klang
56f8f858be Adding AbstractPromise to create an AtomicReferenceFieldUpdater to get rid of the AtomicReference allocation 2011-10-04 21:17:01 +02:00
Viktor Klang
c34b74e13c Adding a todo for AtomicReferenceFieldUpdater in Future.scala 2011-09-29 17:20:59 +02:00
Viktor Klang
a7cb5b5212 Upgrading to SBT 0.11 2011-09-27 10:37:53 +02:00
Viktor Klang
2edd9d9c26 Removing shutdownAllAttachedActors from MessageDispatcher and moving starting of the dispatcher close to the registration for execution 2011-09-26 17:52:52 +02:00
Viktor Klang
d40221e1d8 Adding a more friendly error message to Future.as 2011-09-26 15:33:57 +02:00
Jonas Bonér
00d3b87586 Merge branch 'remote-actorref-provider'
Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2011-09-22 04:38:33 +02:00
Jonas Bonér
7bc698f864 Moved remote-centric config sections out of 'cluster' to 'remote'. Minor renames and refactorings.
Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2011-09-20 16:30:21 +02:00
Jonas Bonér
298b67fea4 RemoteActorRefProvider now instantiates actor on remote host before creating RemoteActorRef and binds it to it.
Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2011-09-19 14:43:28 +02:00
Peter Vlugter
7b1cdb4457 Remove SelfActorRef and use ActorContext to access state in ActorInstance. See #1202
- removed SelfActorRef
- added an ActorContext interface that provides a view into ActorInstance
- the ActorInstance (as ActorContext) gets injected into the Actor
- moved self methods like sender and reply directly to the Actor
2011-09-19 12:03:15 +02:00
Roland
c0bc83b3ed improve documentation of Future.onComplete wrt. ordering 2011-09-16 21:19:59 +02:00
Viktor Klang
9b21dd0af3 Adding 'asynchronous' init of actors (done blocking right now to maintain backwards compat) 2011-09-16 15:28:43 +02:00
Jonas Bonér
2dea305136 Merge branch 'master' into wip-remote-connection-failover 2011-09-08 19:50:33 +02:00
Viktor Klang
d8390a61f6 #1180 - moving the Java API to Futures and Scala API to Future 2011-09-08 15:54:06 +02:00
Roland
950f311648 fix compilation warnings (failed @Inline, erased types)
- make no-@Inline variant of DefaultPromise.timeLeft()
- remove type parameters from matches where not needed
- switch DinigHackersOnFsm to self.channel
2011-09-05 09:29:51 +02:00
Roland
7a834c17c3 improve wording of doc for Future.await(atMost), fixes #1158 2011-09-02 08:47:28 +02:00
Jonas Bonér
bf7ef7234a Refactored and renamed API for FailureDetector.
Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2011-09-01 14:58:18 +02:00
Viktor Klang
c7d58c600b Adding initial support for Props 2011-08-26 17:25:18 +02:00
Roland
2d1a54a50d Merge forward-ports from branch 'release-1.2' 2011-08-14 23:48:33 +02:00
Peter Veentjer
1c39ed1ad6 cleanup of unused imports 2011-08-13 08:27:10 +03:00
Viktor Klang
37a6844d46 Changing default connection timeout to 100 seconds and adding Future Java API with tests 2011-08-12 17:26:26 +02:00
Roland
cdae21e07c restore behavior of Future.as[T] and .asSilently[T] (fixes #1088)
- implement both methods equivalently directly on Future
- remove implicit conversion futureToAnyOptionAsTypedOption
- update docs accordingly
2011-08-09 22:26:46 +02:00
Roland
deb7497038 Merge channel-cleanup into remote branch 'origin/master'
Conflicts:
	akka-actor/src/main/scala/akka/dispatch/Future.scala
2011-08-09 22:05:29 +02:00
Viktor Klang
5c4488730f Fixing FutureTimeoutException so that it has a String constructor so it's deserializable in remoting 2011-08-08 15:38:22 +02:00
Derek Williams
0ae7a72f3a Future: Reschedule onTimeout/orElse if not yet expired 2011-08-06 14:10:36 -06:00
Derek Williams
bc1f7565b7 Fixed race in Future.await, and minor changes to Future.result and Future.exception 2011-08-06 13:32:03 -06:00
Viktor Klang
8a1d31691c Removing deprecated methods from Future and removing one of the bad guys _as_ 2011-08-06 20:44:49 +02:00
Viktor Klang
811e14e081 Fixing await so that it respects infinite timeouts 2011-08-06 20:05:43 +02:00
Viktor Klang
9fb91e92c9 Removing awaitBlocking from Future since Futures cannot be completed after timed out, also cleaning up a lot of code to use pattern matching instead of if/else while simplifying and avoiding allocations 2011-08-06 18:49:50 +02:00
Viktor Klang
458724de34 Reimplementing DefaultCompletableFuture to be as non-blocking internally as possible 2011-08-06 14:19:42 +02:00
Derek Williams
c6bdd33d9e Future: make callback stack usable outside of DefaultPromise, make Future.flow use callback stack, hide java api from Scala 2011-08-05 08:55:36 -06:00
Derek Williams
d378818414 Use dispatcher from the passed in Future 2011-08-03 10:11:24 -06:00
Viktor Klang
814eb1e321 Merge branch 'master' of github.com:jboner/akka 2011-08-03 14:26:26 +02:00
Viktor Klang
a589238f9c Set PartialFunction[T,Unit] as onResult callback, closing ticket #1077 2011-08-03 14:26:01 +02:00
Derek Williams
00494cf95d Fix for error while generating scaladocs 2011-08-02 13:38:02 -06:00
Derek Williams
fbbeacc1e4 Allow a Duration to be used with Future.apply 2011-08-02 13:01:10 -06:00
Derek Williams
8db226f663 Merge branch 'master' into derekjw-1054
Conflicts:
	akka-actor-tests/src/test/scala/akka/dispatch/FutureSpec.scala
2011-08-02 11:21:48 -06:00
Derek Williams
a0350d03e9 Future: move implicit dispatcher from methods to constructor 2011-08-02 10:19:49 -06:00
Roland
a43418a4c3 clean up Channel API (fixes #1070)
- remove feature query methods
- encode information in marker traits
- remove safe_!
- rename tellSafe to tryTell (harmonize with ActorRef.reply)
2011-08-01 21:38:28 +02:00
Viktor Klang
29ca6a867b Making MessageDispatcher an abstract class, as well as ActorRef 2011-08-01 15:23:57 +02:00