Commit graph

77 commits

Author SHA1 Message Date
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
e9a6c16bdc fix CallingThreadMailbox.hasMessages, see #1918 2012-04-03 16:28:36 +02:00
Patrik Nordwall
2a6b7f9b03 Moved decider to separate parameter list, and implicit conversion from Seq[Throwable]. See #1714 2012-01-24 10:35:09 +01:00
Patrik Nordwall
abc072ef0a Improved API of OneForOneStrategy and AllForOneStrategy. See #1714
* withinTimeRange: Duration
* Removed need for Options in API
2012-01-24 08:46:27 +01:00
Roland
2a0c4ca145 Merge branch 'wip-1581-patterns-ask' 2012-01-23 18:35:30 +01:00
Patrik Nordwall
66e0a7cf0b Moved definition of fault handler from Props to overridable method supervisorStrategy in Actor. See #1711
* New trait SupervisorStrategy for TypedActors
* Adjustments of docs
* Updated tests
2012-01-23 13:49:19 +01:00
Roland
34a0f005b1 Merge branch 'master' into wip-1581-patterns-ask 2012-01-20 19:29:17 +01:00
Roland
f4587322be make TestActorRef’s dispatcher configurable, fixes #1162 2012-01-20 18:34:09 +01:00
Viktor Klang
149fbea5a7 Updating Copyright as per #1660 2012-01-19 18:21:06 +01:00
Viktor Klang
19347dadbc Renaming TestActorRef.apply to receive, in order to get forwarders generated & improve Java API 2012-01-19 15:49:44 +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
Roland
d0498eb32e add Class[_] to LogEvent
- it is customary to use class name for categorizing logs, hence we
  should support it; class is taken from logSource.getClass
- update SLF4J module to use logClass as category and set logSource in
  MDC "akkaSource"
- add docs
2012-01-12 13:29:17 +01:00
Nikolay Botev
ce1d2f4721 akka.patterns.ask everywhere 2012-01-01 22:23:19 -08:00
Viktor Klang
2044faa72a Removing unchecked pattern 2011-12-27 14:51:57 +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
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
Viktor Klang
b32cbbc764 Renaming Block to Await, renaming sync to result, renaming on to ready, Await.ready and Await.result looks and reads well 2011-12-12 22:50:08 +01:00
Viktor Klang
2d418c188f Renaming completeWithResult to success, completeWithException to failure, adding tryComplete to signal whether the completion was made or not 2011-12-12 17:25:34 +01:00
Viktor Klang
2673a9c047 Removing Future.as[] and commenting out 2 Java Specs because the compiler can't find them? 2011-12-11 20:12:55 +01:00
Patrik Nordwall
f7d6393027 Removed actorOf methods from AkkaSpec. See #1439 2011-12-07 11:10:54 +01:00
Patrik Nordwall
1402c7692e Minor fixes from review comments. See #1377 2011-12-07 10:07:46 +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
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
a3e6fca530 rename RefInternals to InternalActorRef and restructure
- IAR is subclass of AR and SAR
- all concrete ARs implement IAR
- move sendSystemMessage to IAR

all in preparation for unifying the ActorPath look-up for local&remote
actor refs
2011-12-02 14:45:10 +01:00
Viktor Klang
fcc6169ede Removing the final usages of startsWatching/stopsWatching 2011-12-02 01:00:55 +01:00
Viktor Klang
c56341b3a6 Fixing FIXME to rename isShutdown to isTerminated 2011-11-23 19:03:56 +01:00
Viktor Klang
80d766b07b Adding DispatcherPrerequisites to hold the common dependencies that a dispatcher needs to be created 2011-11-17 16:09:18 +01:00
Roland
62032cb1ff merge system-cleanup into master 2011-11-17 14:38:49 +01:00
Roland
648661c548 clean up initialization of ActorSystem, fixes #1050
- create ActorSystemImpl trait to make ActorSystem fully abstract
- add Java API for constructing (ActorSystem.create(...))
- only go through factory methods because .start() has become necessary
- rename all user-facing occurrences of “app” to “system” (Actor trait
  and TestKit/AkkaSpec)
- pass ActorSystemImpl to ActorRefs upon creation, which means that
  actorOf() and friends need such an argument, which must be provided to
  the ActorRefProvider by the ActorRefFactory implementation
2011-11-16 17:18:36 +01:00
Viktor Klang
18bfa26272 Renaming startsMonitoring/stopsMonitoring to startsWatching and stopsWatching 2011-11-16 16:46:16 +01:00
Roland
f2bf27b4de remove app argument from Dispatchers
(cascading into all dispatchers, mailboxes, other stuff; had to move
deadLetter stuff to ActorSystem again and split its initialization due
to cyclic dependency)
2011-11-14 16:03:26 +01:00
Roland
945b1aedf9 rename akka.AkkaApplication to akka.actor.ActorSystem
Renaming it to System did not appeal after seeing that such a thing is
already imported from Predef ...
2011-11-10 21:00:01 +01:00
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
Roland
c1a9475015 TestEventFilter overhaul
- make normal filters available for all four log levels
- allow filtering for
  + exact and complete message
  + start of message
  + regular expression
- keep count of occurrences if requested and verify correct count at end
  of filterEvents/filterExceptions block
- remove akka.testkit.Testing (sleepFor replaced by Duration.dilated.sleep)
- remove Duration.timeFactor (needs config -> AkkaApplication)
- TestLatch needs config -> AkkaApplication (was forgotten because used
  directly System.getProperty)
- lots of scaladoc for TestEventListener infrastructure
2011-11-07 22:23:48 +01:00
Viktor Klang
91545a4b52 Fixing TestActorRefSpec, now everything's green 2011-10-31 16:09:53 +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
bb942750aa make most AkkaSpec-based tests runnable in Eclipse 2011-10-21 17:01:22 +02:00
Roland
d55f02e6c1 merge master into parental-supervision, fixing up resulting breakage 2011-10-21 15:11:43 +02:00
Roland
d3837b9fc3 Introduce parental supervision, BUT TESTS ARE STILL FAILING
- every actor is now supervised, where the root of the tree is
  app.guardian, which has its supervisor field set to a special ActorRef
  obtained from provider.theOneWhoWalksTheBubblesOfSpaceTime (this name
  is meant to indicate that this ref is outside of the universe, cf.
  Michio Kaku)
- changed all tests to obtain specially supervised children (i.e. not
  top-level) via (supervisor ? Props).as[ActorRef].get
- add private[akka] ScalaActorRef.sendSystemMessage for sending
  Supervise()
- everything routing or remote is broken wrt. supervision, as that was
  not “properly” implemented to begin with, will be tackled after
  app/supervision/eventbus/AkkaSpec are stabilized enough
2011-10-19 17:18:50 +02:00
Viktor Klang
77dc9e9c35 #1299 - Removing reply and tryReply, preparing the way for 'sender ! response' 2011-10-19 16:59:47 +02:00
Viktor Klang
474787a81d Renaming createActor to actorOf 2011-10-18 17:56:23 +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
Roland
2599de0381 Scalariform & add AkkaSpec 2011-10-10 11:22:01 +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
0f049d67e6 Removing ActorRef.isRunning - replaced in full by isShutdown, if it returns true the actor is forever dead, if it returns false, it might be (race) 2011-10-03 19:43:45 +02:00