Commit graph

142 commits

Author SHA1 Message Date
Viktor Klang
54a3a44bf8 #2292 - Removing akka.util.Duration etc and replace it with scala.concurrent.util.Duration 2012-06-29 13:33:20 +02:00
Viktor Klang
1a7f29aaec Making everything compile and tests pass 2012-06-28 15:33:49 +02:00
Viktor Klang
702b5d9c19 Switching to the embedded jsr166y in scala.concurrent and dropping akka.jsr166y 2012-06-26 18:19:55 +02:00
Viktor Klang
7f429ed63e Merge with master 2012-06-25 12:55:25 +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
4ee2033761 Lots and lots of work to get things to compile without warnings 2012-06-13 15:44:24 +02:00
Roland
fd1d0ce121 make cleanUp of systemMessages atomic
- extend systemDrain to take the new contents which shall be switched in
- make NoMessage placeholder which will signal final closing of the
  mailbox
- put that in when cleaning up, and check it when enqueuing
2012-06-04 13:20:53 +02:00
Viktor Klang
1821927023 Merge branch 'wip-2134-deathwatch2.0-√' of github.com:akka/akka into wip-2134-deathwatch2.0-√ 2012-06-04 11:48:40 +02:00
Viktor Klang
2e788c9704 Adding some sanity and some CAS-magic 2012-06-04 11:46:59 +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
b45cec3da4 Preparing Akka Camel for bin compat 2012-05-23 15:17:49 +02:00
Viktor Klang
95db4bfd37 Moving out ConfigurationException from akka.config to akka 2012-05-16 17:04:13 +02:00
Viktor Klang
0eb5c503f5 Changing to the correct gh id for me in the Publish.scala 2012-05-11 16:19:46 +02:00
Viktor Klang
db3ce87917 Removing the Atomic*Updaters from MessageDispatcher, switching to Unsafe all the way baby 2012-05-11 15:00:37 +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
Viktor Klang
3badf25bc0 Hardening the suspend/resume methods so that actorcells with dlqs aren't throwing up 2012-04-03 00:37:09 +02:00
Roland
8a5db512f3 fix shutdown of remote routers, see #1872
- ActorCell.stop(actor) removed the actor from childrenRefs before
  handleChildTerminated, leading to removing from Locker immediately
  after adding it in
- intercept ChildTerminated message in RemoteTransport.receive if
  destination is not found (i.e. isTerminate==true) and re-route to
  Locker, which was changed to support path-based lookup to find the
  parent and funnel the ChildTerminated to its intended destination
- add Locker.shutdown() to detach remaining actors from their
  dispatchers upon system termination.
2012-02-28 15:48:02 +01:00
Roland
eaee16c7d3 include system.settings when constructing MailboxType, see #1864
- necessary to not have to construct one Settings object per
  MessageQueue
- added system.settings to DispatcherPrerequisites
2012-02-26 21:26:25 +01:00
Roland
c84daf83e8 clean up mailbox types configurability, see #1843
- add (config) constructors to std mailbox types
- update docs for prio mailbox to directly implement MailboxType
2012-02-21 16:40:34 +01:00
Viktor Klang
3a1cdab917 Adding union interfaces for ES and EC and E and adding tests to verify signatures 2012-02-16 17:24:08 +01:00
Viktor Klang
607ec4c2cf Switching approaches to check for max throttle 2012-02-13 18:14:35 +01:00
Roland
7c57a9d60e final touch to actor start-up sequence
split systemDispatch(Create()) into systemEnqueue(Create()) directly
after createMailbox and registerForExecution from within
Dispatcher.attach() (resp. CallingThreadDispatcher.register() does its
own thing)
2012-02-13 15:33:31 +01:00
Roland
251a7cc7e3 clean up BalancingDispatcher:
- change from messageQueue.numberOfMessages to maintaining an AtomicLong
  for performance reasons
- add comments/scaladoc where missing
- remove some assert()s
- fix ResiserSpec to employ buddy-wakeup-threshold
2012-02-13 12:38:59 +01:00
Roland
a2ef3eed7e scaffolding: make debug printout more useful, add assertions 2012-02-10 20:56:52 +01:00
Roland
d2f28a06cd Merge remote-tracking branch 'origin/master' into wip-1750-remove-ReflectiveAccess-∂π 2012-02-10 11:41:47 +01:00
Roland
dca309c535 incorporate Patrik’s feedback
- rename to DynamicAccess
- rename to createInstanceFor / createClassFor
- fix a few little things
2012-02-10 11:36:23 +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
Roland
2ce47d6bb5 Bye-bye ReflectiveAccess, introducing PropertyMaster, see #1750
- PropertyMaster is the only place in Akka which calls
  ClassLoader.getClass (apart from kernel, which might be special)
- all PropertyMaster methods (there are only three) take a ClassManifest
  of what is to be constructed, and they verify that the obtained object
  is actually compatible with the required type

Other stuff:
- noticed that I had forgotten to change to ExtendedActorSystem when
  constructing Extensions by ExtensionKey (damn you, reflection!)
- moved Serializer.currentSystem into JavaSerializer, because that’s the
  only one needing it (it’s only used in readResolve() methods)
- Serializers are constructed now with one-arg constructor taking
  ExtendedActorSystem (if that exists, otherwise no-arg as before), to
  allow JavaSerializer to do its magic; possibly necessary for others as
  well
- Removed all Option[ClassLoader] signatures
- made it so that the ActorSystem will try context class loader, then
  the class loader which loaded the class actually calling into
  ActorSystem.apply, then the loader which loaded ActorSystemImpl
- for the second of the above I added a (reflectively accessed hopefully
  safe) facility for getting caller Class[_] objects by using
  sun.reflect.Reflection; this is optional an defaults to None, e.g. on
  Android, which means that getting the caller’s classloader is done on
  a best effort basis (there’s nothing we can do because a StackTrace
  does not contain actual Class[_] objects).
- refactored DurableMailbox to contain the owner val and use that
  instead of declaring that in all subclasses
2012-02-09 11:56:43 +01:00
Patrik Nordwall
df1606a8ee Adjustments based on review. See #1805 2012-02-08 14:03:31 +01:00
Patrik Nordwall
1f988889c2 Proper thread names for fork-join-executor. See #1805 2012-02-08 11:53:55 +01:00
Patrik Nordwall
9c8c0d42c5 Add @SerialVersionUID to Serializable classes. See #1786
* @SerialVersionUID(1L)
* UntypedActorFactory serialization, and test
* Removed Serializable from Serializers
2012-02-07 10:05:54 +01:00
Viktor Klang
66c1e2d835 Sprinkling some finals and adding return types 2012-02-06 15:42:28 +01:00
Viktor Klang
09c44289d4 Creating our own FJTask and escalate exceptions to UHE 2012-02-06 15:19:05 +01:00
Patrik Nordwall
09e13e271b Merge branch 'master' into wip-1310-err2-patriknw
Conflicts:
	akka-actor/src/main/scala/akka/dispatch/AbstractDispatcher.scala
	akka-cluster/src/main/scala/akka/cluster/Cluster.scala
	akka-cluster/src/main/scala/akka/cluster/TransactionLog.scala
	akka-remote/src/main/scala/akka/remote/netty/NettyRemoteSupport.scala
2012-02-03 13:57:28 +01:00
Patrik Nordwall
eb4fc53051 Added cause to LogEventException and ajdusted logging in Future. See #1310 2012-02-03 11:15:42 +01:00
Patrik Nordwall
44b5ff056a Added reportFailure for logging in ExecutionContext. See #1310 2012-02-03 10:37:31 +01:00
Viktor Klang
96412ba1ad Adding ExecutionContext docs for futures, and adding a Java-friendly ExecutionContexts object 2012-02-03 10:35:05 +01:00
Patrik Nordwall
5033647176 Fixed things from review. See #1310 2012-02-01 17:38:12 +01:00
Patrik Nordwall
c447f46224 Some polish on the error handling. See #1310 2012-02-01 14:40:12 +01:00
Patrik Nordwall
f13b5356f7 Second stab at revised error handling. See #1310 2012-01-31 14:44:14 +01:00
Viktor Klang
d0d2bee5c6 Adding correct classloader to executor config 2012-01-31 10:22:20 +01:00
Viktor Klang
3d226cb8ef Switching to fork join as default dispatcher and adding tests for it 2012-01-31 10:12:45 +01:00
Viktor Klang
465c29107d Migrating tests to use the new config for dispatchers 2012-01-30 16:34:25 +01:00
Viktor Klang
8bc6513911 Merge branch 'master' into wip-1728-fjpool-√ 2012-01-30 16:08:04 +01:00
Viktor Klang
847a2e1885 Adding support for the ForkJoinPool 2012-01-30 15:34:56 +01:00
Viktor Klang
c1dd4463b9 Restructuring how executors are configured and making sure people can plug in their own 2012-01-30 13:44:56 +01:00
Roland
4fb0858e55 remote cleanup: include feedback from Viktor and Patrik
- re-label Client/Server to Inbound/Outbound for netty settings
  description
- move to just using exactly one class loader for all reflective
  activities of the ActorSystem, which is either the context class
  loader or the one which loaded the ActorSystem’s class; document that
  putting Akka on boot class path will not work
- be more careful with initializing the Client- and ServerBootstrap
- rename Port to DesiredPortFromConfig to discourage misuse
- write test for NettySettings
- various small fixes
2012-01-30 11:57:24 +01:00
Viktor Klang
b045383a72 Changing signature of the createThreadPool in MDC to return the MD 2012-01-27 15:30:24 +01:00