diff --git a/.gitignore b/.gitignore
index d44d7ea405..7fa5190d1f 100755
--- a/.gitignore
+++ b/.gitignore
@@ -49,7 +49,8 @@ multiverse.log
.eprj
.*.swp
akka-docs/_build/
-akka-docs/epilog_rst
+akka-docs/rst_html
+akka-docs/rst_latex
*.pyc
akka-docs/exts/
_akka_cluster/
diff --git a/akka-cluster/src/main/resources/reference.conf b/akka-cluster/src/main/resources/reference.conf
index fa6860a1a8..e2fe6cc8d1 100644
--- a/akka-cluster/src/main/resources/reference.conf
+++ b/akka-cluster/src/main/resources/reference.conf
@@ -36,9 +36,6 @@ akka {
# how often should the node send out gossip information?
gossip-interval = 1s
- # how often should the node send out heartbeats?
- heartbeat-interval = 1s
-
# how often should the leader perform maintenance tasks?
leader-actions-interval = 1s
@@ -76,6 +73,9 @@ akka {
# akka.cluster.ClusterSettings parameters
implementation-class = "akka.cluster.AccrualFailureDetector"
+ # how often should the node send out heartbeats?
+ heartbeat-interval = 1s
+
# defines the failure detector threshold
# A low threshold is prone to generate many wrong suspicions but ensures
# a quick detection in the event of a real crash. Conversely, a high
diff --git a/akka-cluster/src/main/scala/akka/cluster/ClusterSettings.scala b/akka-cluster/src/main/scala/akka/cluster/ClusterSettings.scala
index 4212e59c1c..3c7baa4f76 100644
--- a/akka-cluster/src/main/scala/akka/cluster/ClusterSettings.scala
+++ b/akka-cluster/src/main/scala/akka/cluster/ClusterSettings.scala
@@ -23,6 +23,7 @@ class ClusterSettings(val config: Config, val systemName: String) {
Duration(getMilliseconds("akka.cluster.failure-detector.min-std-deviation"), MILLISECONDS)
final val FailureDetectorAcceptableHeartbeatPause: FiniteDuration =
Duration(getMilliseconds("akka.cluster.failure-detector.acceptable-heartbeat-pause"), MILLISECONDS)
+ final val HeartbeatInterval: FiniteDuration = Duration(getMilliseconds("akka.cluster.failure-detector.heartbeat-interval"), MILLISECONDS)
final val SeedNodes: IndexedSeq[Address] = getStringList("akka.cluster.seed-nodes").asScala.map {
case AddressFromURIString(addr) ⇒ addr
@@ -30,7 +31,6 @@ class ClusterSettings(val config: Config, val systemName: String) {
final val SeedNodeTimeout: FiniteDuration = Duration(getMilliseconds("akka.cluster.seed-node-timeout"), MILLISECONDS)
final val PeriodicTasksInitialDelay: FiniteDuration = Duration(getMilliseconds("akka.cluster.periodic-tasks-initial-delay"), MILLISECONDS)
final val GossipInterval: FiniteDuration = Duration(getMilliseconds("akka.cluster.gossip-interval"), MILLISECONDS)
- final val HeartbeatInterval: FiniteDuration = Duration(getMilliseconds("akka.cluster.heartbeat-interval"), MILLISECONDS)
final val LeaderActionsInterval: FiniteDuration = Duration(getMilliseconds("akka.cluster.leader-actions-interval"), MILLISECONDS)
final val UnreachableNodesReaperInterval: FiniteDuration = Duration(getMilliseconds("akka.cluster.unreachable-nodes-reaper-interval"), MILLISECONDS)
final val PublishStatsInterval: FiniteDuration = Duration(getMilliseconds("akka.cluster.publish-stats-interval"), MILLISECONDS)
diff --git a/akka-cluster/src/multi-jvm/scala/akka/cluster/MultiNodeClusterSpec.scala b/akka-cluster/src/multi-jvm/scala/akka/cluster/MultiNodeClusterSpec.scala
index f38d80ace5..68ed7d91e7 100644
--- a/akka-cluster/src/multi-jvm/scala/akka/cluster/MultiNodeClusterSpec.scala
+++ b/akka-cluster/src/multi-jvm/scala/akka/cluster/MultiNodeClusterSpec.scala
@@ -8,7 +8,7 @@ import com.typesafe.config.Config
import com.typesafe.config.ConfigFactory
import akka.actor.{ Address, ExtendedActorSystem }
import akka.remote.testconductor.RoleName
-import akka.remote.testkit.{STMultiNodeSpec, MultiNodeSpec}
+import akka.remote.testkit.{ STMultiNodeSpec, MultiNodeSpec }
import akka.testkit._
import scala.concurrent.util.duration._
import scala.concurrent.util.Duration
@@ -31,15 +31,15 @@ object MultiNodeClusterSpec {
def clusterConfig: Config = ConfigFactory.parseString("""
akka.actor.provider = akka.cluster.ClusterActorRefProvider
akka.cluster {
- auto-join = on
- auto-down = off
- jmx.enabled = off
- gossip-interval = 200 ms
- heartbeat-interval = 400 ms
- leader-actions-interval = 200 ms
- unreachable-nodes-reaper-interval = 200 ms
- periodic-tasks-initial-delay = 300 ms
- publish-stats-interval = 0 s # always, when it happens
+ auto-join = on
+ auto-down = off
+ jmx.enabled = off
+ gossip-interval = 200 ms
+ leader-actions-interval = 200 ms
+ unreachable-nodes-reaper-interval = 200 ms
+ periodic-tasks-initial-delay = 300 ms
+ publish-stats-interval = 0 s # always, when it happens
+ failure-detector.heartbeat-interval = 400 ms
}
akka.remote.log-remote-lifecycle-events = off
akka.test {
diff --git a/akka-docs/more.png b/akka-docs/more.png
deleted file mode 100644
index 3eb7b05c84..0000000000
Binary files a/akka-docs/more.png and /dev/null differ
diff --git a/akka-docs/additional/code/osgi/Activator.scala b/akka-docs/rst/additional/code/osgi/Activator.scala
similarity index 100%
rename from akka-docs/additional/code/osgi/Activator.scala
rename to akka-docs/rst/additional/code/osgi/Activator.scala
diff --git a/akka-docs/additional/code/osgi/blueprint.xml b/akka-docs/rst/additional/code/osgi/blueprint.xml
similarity index 100%
rename from akka-docs/additional/code/osgi/blueprint.xml
rename to akka-docs/rst/additional/code/osgi/blueprint.xml
diff --git a/akka-docs/additional/index.rst b/akka-docs/rst/additional/index.rst
similarity index 100%
rename from akka-docs/additional/index.rst
rename to akka-docs/rst/additional/index.rst
diff --git a/akka-docs/additional/language-bindings.rst b/akka-docs/rst/additional/language-bindings.rst
similarity index 100%
rename from akka-docs/additional/language-bindings.rst
rename to akka-docs/rst/additional/language-bindings.rst
diff --git a/akka-docs/additional/osgi.rst b/akka-docs/rst/additional/osgi.rst
similarity index 100%
rename from akka-docs/additional/osgi.rst
rename to akka-docs/rst/additional/osgi.rst
diff --git a/akka-docs/additional/recipes.rst b/akka-docs/rst/additional/recipes.rst
similarity index 100%
rename from akka-docs/additional/recipes.rst
rename to akka-docs/rst/additional/recipes.rst
diff --git a/akka-docs/cluster/cluster-usage.rst b/akka-docs/rst/cluster/cluster-usage.rst
similarity index 76%
rename from akka-docs/cluster/cluster-usage.rst
rename to akka-docs/rst/cluster/cluster-usage.rst
index b0ec8f08b7..12be1c238c 100644
--- a/akka-docs/cluster/cluster-usage.rst
+++ b/akka-docs/rst/cluster/cluster-usage.rst
@@ -16,10 +16,12 @@ The Akka cluster is a separate jar file. Make sure that you have the following d
.. parsed-literal::
- "com.typesafe.akka" %% "akka-cluster" % "2.1-SNAPSHOT"
+ "com.typesafe.akka" %% "akka-cluster" % "@version@" @crossString@
-If you are using the latest nightly build you should pick a timestamped Akka version from ``_. Don't use ``SNAPSHOT``. Note that the Scala version |scalaVersion|
-is part of the artifactId.
+If you are using the latest nightly build you should pick a timestamped Akka
+version from
+``_.
+We recommend against using ``SNAPSHOT`` in order to obtain stable builds.
A Simple Cluster Example
^^^^^^^^^^^^^^^^^^^^^^^^
@@ -32,7 +34,7 @@ Try it out:
1. Add the following ``application.conf`` in your project, place it in ``src/main/resources``:
-.. literalinclude:: ../../akka-samples/akka-sample-cluster/src/main/resources/application.conf
+.. literalinclude:: ../../../akka-samples/akka-sample-cluster/src/main/resources/application.conf
:language: none
To enable cluster capabilities in your Akka project you should, at a minimum, add the :ref:`remoting-scala`
@@ -47,20 +49,20 @@ ip-addresses or host names of the machines in ``application.conf`` instead of ``
2. Add the following main program to your project, place it in ``src/main/scala``:
-.. literalinclude:: ../../akka-samples/akka-sample-cluster/src/main/scala/sample/cluster/simple/SimpleClusterApp.scala
+.. literalinclude:: ../../../akka-samples/akka-sample-cluster/src/main/scala/sample/cluster/simple/SimpleClusterApp.scala
:language: scala
3. Start the first seed node. Open a sbt session in one terminal window and run::
- run-main sample.cluster.simple.SimpleClusterApp 2551
+ run-main sample.cluster.simple.SimpleClusterApp 2551
2551 corresponds to the port of the first seed-nodes element in the configuration.
In the log output you see that the cluster node has been started and changed status to 'Up'.
4. Start the second seed node. Open a sbt session in another terminal window and run::
- run-main sample.cluster.simple.SimpleClusterApp 2552
+ run-main sample.cluster.simple.SimpleClusterApp 2552
2552 corresponds to the port of the second seed-nodes element in the configuration.
@@ -71,7 +73,7 @@ Switch over to the first terminal window and see in the log output that the memb
5. Start another node. Open a sbt session in yet another terminal window and run::
- run-main sample.cluster.simple.SimpleClusterApp
+ run-main sample.cluster.simple.SimpleClusterApp
Now you don't need to specify the port number, and it will use a random available port.
It joins one of the configured seed nodes. Look at the log output in the different terminal
@@ -167,15 +169,15 @@ added or removed to the cluster dynamically.
In this example the following imports are used:
-.. includecode:: ../../akka-samples/akka-sample-cluster/src/main/scala/sample/cluster/transformation/TransformationSample.scala#imports
+.. includecode:: ../../../akka-samples/akka-sample-cluster/src/main/scala/sample/cluster/transformation/TransformationSample.scala#imports
Messages:
-.. includecode:: ../../akka-samples/akka-sample-cluster/src/main/scala/sample/cluster/transformation/TransformationSample.scala#messages
+.. includecode:: ../../../akka-samples/akka-sample-cluster/src/main/scala/sample/cluster/transformation/TransformationSample.scala#messages
The backend worker that performs the transformation job:
-.. includecode:: ../../akka-samples/akka-sample-cluster/src/main/scala/sample/cluster/transformation/TransformationSample.scala#backend
+.. includecode:: ../../../akka-samples/akka-sample-cluster/src/main/scala/sample/cluster/transformation/TransformationSample.scala#backend
Note that the ``TransformationBackend`` actor subscribes to cluster events to detect new,
potential, frontend nodes, and send them a registration message so that they know
@@ -183,7 +185,7 @@ that they can use the backend worker.
The frontend that receives user jobs and delegates to one of the registered backend workers:
-.. includecode:: ../../akka-samples/akka-sample-cluster/src/main/scala/sample/cluster/transformation/TransformationSample.scala#frontend
+.. includecode:: ../../../akka-samples/akka-sample-cluster/src/main/scala/sample/cluster/transformation/TransformationSample.scala#frontend
Note that the ``TransformationFrontend`` actor watch the registered backend
to be able to remove it from its list of availble backend workers.
@@ -212,6 +214,57 @@ frontend nodes and 3 backend nodes::
.. note:: The above example should probably be designed as two separate, frontend/backend, clusters, when there is a `cluster client for decoupling clusters `_.
+Failure Detector
+^^^^^^^^^^^^^^^^
+
+The nodes in the cluster monitor each other by sending heartbeats to detect if a node is
+unreachable from the rest of the cluster. The heartbeat arrival times is interpreted
+by an implementation of
+`The Phi Accrual Failure Detector `_.
+
+The suspicion level of failure is given by a value called *phi*.
+The basic idea of the phi failure detector is to express the value of *phi* on a scale that
+is dynamically adjusted to reflect current network conditions.
+
+The value of *phi* is calculated as::
+
+ phi = -log10(1 - F(timeSinceLastHeartbeat)
+
+where F is the cumulative distribution function of a normal distribution with mean
+and standard deviation estimated from historical heartbeat inter-arrival times.
+
+In the :ref:`cluster_configuration` you can adjust the ``akka.cluster.failure-detector.threshold``
+to define when a *phi* value is considered to be a failure.
+
+A low ``threshold`` is prone to generate many false positives but ensures
+a quick detection in the event of a real crash. Conversely, a high ``threshold``
+generates fewer mistakes but needs more time to detect actual crashes. The
+default ``threshold`` is 8 and is appropriate for most situations. However in
+cloud environments, such as Amazon EC2, the value could be increased to 12 in
+order to account for network issues that sometimes occur on such platforms.
+
+The following chart illustrates how *phi* increase with increasing time since the
+previous heartbeat.
+
+.. image:: images/phi1.png
+
+Phi is calculated from the mean and standard deviation of historical
+inter arrival times. The previous chart is an example for standard deviation
+of 200 ms. If the heartbeats arrive with less deviation the curve becomes steeper,
+i.e. it's possible to determine failure more quickly. The curve looks like this for
+a standard deviation of 100 ms.
+
+.. image:: images/phi2.png
+
+To be able to survive sudden abnormalities, such as garbage collection pauses and
+transient network failures the failure detector is configured with a margin,
+``akka.cluster.failure-detector.acceptable-heartbeat-pause``. You may want to
+adjust the :ref:`cluster_configuration` of this depending on you environment.
+This is how the curve looks like for ``acceptable-heartbeat-pause`` configured to
+3 seconds.
+
+.. image:: images/phi3.png
+
Cluster Aware Routers
^^^^^^^^^^^^^^^^^^^^^
@@ -224,7 +277,7 @@ routees are added to the router, according to the configuration.
When using a router with routees looked up on the cluster member nodes, i.e. the routees
are already running, the configuration for a router looks like this:
-.. includecode:: ../../akka-samples/akka-sample-cluster/src/multi-jvm/scala/sample/cluster/stats/StatsSampleSpec.scala#router-lookup-config
+.. includecode:: ../../../akka-samples/akka-sample-cluster/src/multi-jvm/scala/sample/cluster/stats/StatsSampleSpec.scala#router-lookup-config
It's the relative actor path defined in ``routees-path`` that identify what actor to lookup.
@@ -234,12 +287,12 @@ added to the router when nodes join the cluster.
The same type of router could also have been defined in code:
-.. includecode:: ../../akka-samples/akka-sample-cluster/src/main/scala/sample/cluster/stats/StatsSample.scala#router-lookup-in-code
+.. includecode:: ../../../akka-samples/akka-sample-cluster/src/main/scala/sample/cluster/stats/StatsSample.scala#router-lookup-in-code
When using a router with routees created and deployed on the cluster member nodes
the configuration for a router looks like this:
-.. includecode:: ../../akka-samples/akka-sample-cluster/src/multi-jvm/scala/sample/cluster/stats/StatsSampleSingleMasterSpec.scala#router-deploy-config
+.. includecode:: ../../../akka-samples/akka-sample-cluster/src/multi-jvm/scala/sample/cluster/stats/StatsSampleSingleMasterSpec.scala#router-deploy-config
``nr-of-instances`` defines total number of routees in the cluster, but the number of routees
@@ -249,7 +302,7 @@ the cluster.
The same type of router could also have been defined in code:
-.. includecode:: ../../akka-samples/akka-sample-cluster/src/main/scala/sample/cluster/stats/StatsSample.scala#router-deploy-in-code
+.. includecode:: ../../../akka-samples/akka-sample-cluster/src/main/scala/sample/cluster/stats/StatsSample.scala#router-deploy-in-code
See :ref:`cluster_configuration` section for further descriptions of the settings.
@@ -267,19 +320,19 @@ the average number of characters per word when all results have been collected.
In this example we use the following imports:
-.. includecode:: ../../akka-samples/akka-sample-cluster/src/main/scala/sample/cluster/stats/StatsSample.scala#imports
+.. includecode:: ../../../akka-samples/akka-sample-cluster/src/main/scala/sample/cluster/stats/StatsSample.scala#imports
Messages:
-.. includecode:: ../../akka-samples/akka-sample-cluster/src/main/scala/sample/cluster/stats/StatsSample.scala#messages
+.. includecode:: ../../../akka-samples/akka-sample-cluster/src/main/scala/sample/cluster/stats/StatsSample.scala#messages
The worker that counts number of characters in each word:
-.. includecode:: ../../akka-samples/akka-sample-cluster/src/main/scala/sample/cluster/stats/StatsSample.scala#worker
+.. includecode:: ../../../akka-samples/akka-sample-cluster/src/main/scala/sample/cluster/stats/StatsSample.scala#worker
The service that receives text from users and splits it up into words, delegates to workers and aggregates:
-.. includecode:: ../../akka-samples/akka-sample-cluster/src/main/scala/sample/cluster/stats/StatsSample.scala#service
+.. includecode:: ../../../akka-samples/akka-sample-cluster/src/main/scala/sample/cluster/stats/StatsSample.scala#service
Note, nothing cluster specific so far, just plain actors.
@@ -290,7 +343,7 @@ or with create and deploy of routees. Remember, routees are the workers in this
We start with the router setup with lookup of routees. All nodes start ``StatsService`` and
``StatsWorker`` actors and the router is configured with ``routees-path``:
-.. includecode:: ../../akka-samples/akka-sample-cluster/src/main/scala/sample/cluster/stats/StatsSample.scala#start-router-lookup
+.. includecode:: ../../../akka-samples/akka-sample-cluster/src/main/scala/sample/cluster/stats/StatsSample.scala#start-router-lookup
This means that user requests can be sent to ``StatsService`` on any node and it will use
``StatsWorker`` on all nodes. There can only be one worker per node, but that worker could easily
@@ -312,7 +365,7 @@ The above setup is nice for this example, but we will also take a look at how to
a single master node that creates and deploys workers. To keep track of a single
master we need one additional actor:
-.. includecode:: ../../akka-samples/akka-sample-cluster/src/main/scala/sample/cluster/stats/StatsSample.scala#facade
+.. includecode:: ../../../akka-samples/akka-sample-cluster/src/main/scala/sample/cluster/stats/StatsSample.scala#facade
The ``StatsFacade`` receives text from users and delegates to the current ``StatsService``, the single
master. It listens to cluster events to create or lookup the ``StatsService`` depending on if
@@ -322,7 +375,7 @@ i.e. it can change when new nodes join or when current leader leaves.
All nodes start ``StatsFacade`` and the router is now configured like this:
-.. includecode:: ../../akka-samples/akka-sample-cluster/src/main/scala/sample/cluster/stats/StatsSample.scala#start-router-deploy
+.. includecode:: ../../../akka-samples/akka-sample-cluster/src/main/scala/sample/cluster/stats/StatsSample.scala#start-router-deploy
This example is included in ``akka-samples/akka-sample-cluster``
@@ -407,7 +460,7 @@ There are several configuration properties for the cluster. We refer to the foll
reference file for more information:
-.. literalinclude:: ../../akka-cluster/src/main/resources/reference.conf
+.. literalinclude:: ../../../akka-cluster/src/main/resources/reference.conf
:language: none
Cluster Scheduler
diff --git a/akka-docs/cluster/cluster.rst b/akka-docs/rst/cluster/cluster.rst
similarity index 100%
rename from akka-docs/cluster/cluster.rst
rename to akka-docs/rst/cluster/cluster.rst
diff --git a/akka-docs/cluster/images/member-states.png b/akka-docs/rst/cluster/images/member-states.png
similarity index 100%
rename from akka-docs/cluster/images/member-states.png
rename to akka-docs/rst/cluster/images/member-states.png
diff --git a/akka-docs/cluster/images/more.png b/akka-docs/rst/cluster/images/more.png
similarity index 100%
rename from akka-docs/cluster/images/more.png
rename to akka-docs/rst/cluster/images/more.png
diff --git a/akka-docs/rst/cluster/images/phi1.png b/akka-docs/rst/cluster/images/phi1.png
new file mode 100644
index 0000000000..104068ec54
Binary files /dev/null and b/akka-docs/rst/cluster/images/phi1.png differ
diff --git a/akka-docs/rst/cluster/images/phi2.png b/akka-docs/rst/cluster/images/phi2.png
new file mode 100644
index 0000000000..af2e756991
Binary files /dev/null and b/akka-docs/rst/cluster/images/phi2.png differ
diff --git a/akka-docs/rst/cluster/images/phi3.png b/akka-docs/rst/cluster/images/phi3.png
new file mode 100644
index 0000000000..bda3c5d345
Binary files /dev/null and b/akka-docs/rst/cluster/images/phi3.png differ
diff --git a/akka-docs/cluster/index.rst b/akka-docs/rst/cluster/index.rst
similarity index 100%
rename from akka-docs/cluster/index.rst
rename to akka-docs/rst/cluster/index.rst
diff --git a/akka-docs/common/circuitbreaker.rst b/akka-docs/rst/common/circuitbreaker.rst
similarity index 100%
rename from akka-docs/common/circuitbreaker.rst
rename to akka-docs/rst/common/circuitbreaker.rst
diff --git a/akka-docs/common/code/docs/circuitbreaker/CircuitBreakerDocSpec.scala b/akka-docs/rst/common/code/docs/circuitbreaker/CircuitBreakerDocSpec.scala
similarity index 100%
rename from akka-docs/common/code/docs/circuitbreaker/CircuitBreakerDocSpec.scala
rename to akka-docs/rst/common/code/docs/circuitbreaker/CircuitBreakerDocSpec.scala
diff --git a/akka-docs/common/code/docs/circuitbreaker/DangerousJavaActor.java b/akka-docs/rst/common/code/docs/circuitbreaker/DangerousJavaActor.java
similarity index 100%
rename from akka-docs/common/code/docs/circuitbreaker/DangerousJavaActor.java
rename to akka-docs/rst/common/code/docs/circuitbreaker/DangerousJavaActor.java
diff --git a/akka-docs/common/code/docs/duration/Java.java b/akka-docs/rst/common/code/docs/duration/Java.java
similarity index 100%
rename from akka-docs/common/code/docs/duration/Java.java
rename to akka-docs/rst/common/code/docs/duration/Java.java
diff --git a/akka-docs/common/code/docs/duration/Sample.scala b/akka-docs/rst/common/code/docs/duration/Sample.scala
similarity index 100%
rename from akka-docs/common/code/docs/duration/Sample.scala
rename to akka-docs/rst/common/code/docs/duration/Sample.scala
diff --git a/akka-docs/common/duration.rst b/akka-docs/rst/common/duration.rst
similarity index 100%
rename from akka-docs/common/duration.rst
rename to akka-docs/rst/common/duration.rst
diff --git a/akka-docs/common/index.rst b/akka-docs/rst/common/index.rst
similarity index 100%
rename from akka-docs/common/index.rst
rename to akka-docs/rst/common/index.rst
diff --git a/akka-docs/conf.py b/akka-docs/rst/conf.py
similarity index 83%
rename from akka-docs/conf.py
rename to akka-docs/rst/conf.py
index 8f58ba0d87..ae3da13292 100644
--- a/akka-docs/conf.py
+++ b/akka-docs/rst/conf.py
@@ -7,7 +7,7 @@ import sys, os
# -- General configuration -----------------------------------------------------
-sys.path.append(os.path.abspath('_sphinx/exts'))
+sys.path.append(os.path.abspath('../_sphinx/exts'))
extensions = ['sphinx.ext.todo', 'includecode']
templates_path = ['_templates']
@@ -17,29 +17,25 @@ exclude_patterns = ['_build', 'pending', 'disabled']
project = u'Akka'
copyright = u'2011, Typesafe Inc'
-version = '2.1-SNAPSHOT'
-release = '2.1-SNAPSHOT'
+version = '@version@'
+release = '@version@'
pygments_style = 'simple'
highlight_language = 'scala'
add_function_parentheses = False
show_authors = True
-f = open('epilog_rst', 'U')
-rst_epilog = "\n" + f.read()
-f.close()
-
# -- Options for HTML output ---------------------------------------------------
html_theme = 'akka'
-html_theme_path = ['_sphinx/themes']
-html_favicon = '_sphinx/static/favicon.ico'
+html_theme_path = ['../_sphinx/themes']
+html_favicon = '../_sphinx/static/favicon.ico'
html_title = 'Akka Documentation'
-html_logo = '_sphinx/static/logo.png'
+html_logo = '../_sphinx/static/logo.png'
#html_favicon = None
-html_static_path = ['_sphinx/static']
+html_static_path = ['../_sphinx/static']
html_last_updated_fmt = '%b %d, %Y'
#html_sidebars = {}
@@ -63,7 +59,7 @@ epub_language = "en"
epub_publisher = epub_author
epub_identifier = "http://doc.akka.io/docs/akka/snapshot/"
epub_scheme = "URL"
-epub_cover = ("_sphinx/static/akka.png", "")
+epub_cover = ("../_sphinx/static/akka.png", "")
# -- Options for LaTeX output --------------------------------------------------
diff --git a/akka-docs/dev/building-akka.rst b/akka-docs/rst/dev/building-akka.rst
similarity index 100%
rename from akka-docs/dev/building-akka.rst
rename to akka-docs/rst/dev/building-akka.rst
diff --git a/akka-docs/dev/developer-guidelines.rst b/akka-docs/rst/dev/developer-guidelines.rst
similarity index 100%
rename from akka-docs/dev/developer-guidelines.rst
rename to akka-docs/rst/dev/developer-guidelines.rst
diff --git a/akka-docs/dev/documentation.rst b/akka-docs/rst/dev/documentation.rst
similarity index 100%
rename from akka-docs/dev/documentation.rst
rename to akka-docs/rst/dev/documentation.rst
diff --git a/akka-docs/dev/index.rst b/akka-docs/rst/dev/index.rst
similarity index 100%
rename from akka-docs/dev/index.rst
rename to akka-docs/rst/dev/index.rst
diff --git a/akka-docs/dev/multi-jvm-testing.rst b/akka-docs/rst/dev/multi-jvm-testing.rst
similarity index 98%
rename from akka-docs/dev/multi-jvm-testing.rst
rename to akka-docs/rst/dev/multi-jvm-testing.rst
index 7658324a74..e08df5de9b 100644
--- a/akka-docs/dev/multi-jvm-testing.rst
+++ b/akka-docs/rst/dev/multi-jvm-testing.rst
@@ -49,8 +49,8 @@ multi-JVM testing (Simplified for clarity):
lazy val buildSettings = Defaults.defaultSettings ++ SbtMultiJvm.multiJvmSettings ++ Seq(
organization := "com.typesafe.akka",
- version := "2.1-SNAPSHOT",
- scalaVersion := "|scalaVersion|",
+ version := "@version@",
+ scalaVersion := "@scalaVersion@",
crossPaths := false
)
diff --git a/akka-docs/dev/team.rst b/akka-docs/rst/dev/team.rst
similarity index 100%
rename from akka-docs/dev/team.rst
rename to akka-docs/rst/dev/team.rst
diff --git a/akka-docs/experimental/index.rst b/akka-docs/rst/experimental/index.rst
similarity index 100%
rename from akka-docs/experimental/index.rst
rename to akka-docs/rst/experimental/index.rst
diff --git a/akka-docs/general/ActorPath.png b/akka-docs/rst/general/ActorPath.png
similarity index 100%
rename from akka-docs/general/ActorPath.png
rename to akka-docs/rst/general/ActorPath.png
diff --git a/akka-docs/general/RemoteDeployment.png b/akka-docs/rst/general/RemoteDeployment.png
similarity index 100%
rename from akka-docs/general/RemoteDeployment.png
rename to akka-docs/rst/general/RemoteDeployment.png
diff --git a/akka-docs/general/actor-systems.rst b/akka-docs/rst/general/actor-systems.rst
similarity index 100%
rename from akka-docs/general/actor-systems.rst
rename to akka-docs/rst/general/actor-systems.rst
diff --git a/akka-docs/general/actors.rst b/akka-docs/rst/general/actors.rst
similarity index 100%
rename from akka-docs/general/actors.rst
rename to akka-docs/rst/general/actors.rst
diff --git a/akka-docs/general/addressing.rst b/akka-docs/rst/general/addressing.rst
similarity index 100%
rename from akka-docs/general/addressing.rst
rename to akka-docs/rst/general/addressing.rst
diff --git a/akka-docs/general/code/docs/config/ConfigDoc.java b/akka-docs/rst/general/code/docs/config/ConfigDoc.java
similarity index 100%
rename from akka-docs/general/code/docs/config/ConfigDoc.java
rename to akka-docs/rst/general/code/docs/config/ConfigDoc.java
diff --git a/akka-docs/general/code/docs/config/ConfigDocSpec.scala b/akka-docs/rst/general/code/docs/config/ConfigDocSpec.scala
similarity index 100%
rename from akka-docs/general/code/docs/config/ConfigDocSpec.scala
rename to akka-docs/rst/general/code/docs/config/ConfigDocSpec.scala
diff --git a/akka-docs/general/configuration.rst b/akka-docs/rst/general/configuration.rst
similarity index 95%
rename from akka-docs/general/configuration.rst
rename to akka-docs/rst/general/configuration.rst
index 78c2fee4b8..47d471863c 100644
--- a/akka-docs/general/configuration.rst
+++ b/akka-docs/rst/general/configuration.rst
@@ -142,7 +142,7 @@ before or after using them to construct an actor system:
.. parsed-literal::
- Welcome to Scala version |scalaVersion| (Java HotSpot(TM) 64-Bit Server VM, Java 1.6.0_27).
+ Welcome to Scala version @scalaVersion@ (Java HotSpot(TM) 64-Bit Server VM, Java 1.6.0_27).
Type in expressions to have them evaluated.
Type :help for more information.
@@ -337,41 +337,41 @@ Each Akka module has a reference configuration file with the default values.
akka-actor
~~~~~~~~~~
-.. literalinclude:: ../../akka-actor/src/main/resources/reference.conf
+.. literalinclude:: ../../../akka-actor/src/main/resources/reference.conf
:language: none
akka-remote
~~~~~~~~~~~
-.. literalinclude:: ../../akka-remote/src/main/resources/reference.conf
+.. literalinclude:: ../../../akka-remote/src/main/resources/reference.conf
:language: none
akka-testkit
~~~~~~~~~~~~
-.. literalinclude:: ../../akka-testkit/src/main/resources/reference.conf
+.. literalinclude:: ../../../akka-testkit/src/main/resources/reference.conf
:language: none
akka-transactor
~~~~~~~~~~~~~~~
-.. literalinclude:: ../../akka-transactor/src/main/resources/reference.conf
+.. literalinclude:: ../../../akka-transactor/src/main/resources/reference.conf
:language: none
akka-agent
~~~~~~~~~~
-.. literalinclude:: ../../akka-agent/src/main/resources/reference.conf
+.. literalinclude:: ../../../akka-agent/src/main/resources/reference.conf
:language: none
akka-zeromq
~~~~~~~~~~~
-.. literalinclude:: ../../akka-zeromq/src/main/resources/reference.conf
+.. literalinclude:: ../../../akka-zeromq/src/main/resources/reference.conf
:language: none
akka-file-mailbox
~~~~~~~~~~~~~~~~~
-.. literalinclude:: ../../akka-durable-mailboxes/akka-file-mailbox/src/main/resources/reference.conf
+.. literalinclude:: ../../../akka-durable-mailboxes/akka-file-mailbox/src/main/resources/reference.conf
:language: none
diff --git a/akka-docs/general/guardians.png b/akka-docs/rst/general/guardians.png
similarity index 100%
rename from akka-docs/general/guardians.png
rename to akka-docs/rst/general/guardians.png
diff --git a/akka-docs/general/index.rst b/akka-docs/rst/general/index.rst
similarity index 100%
rename from akka-docs/general/index.rst
rename to akka-docs/rst/general/index.rst
diff --git a/akka-docs/general/jmm.rst b/akka-docs/rst/general/jmm.rst
similarity index 100%
rename from akka-docs/general/jmm.rst
rename to akka-docs/rst/general/jmm.rst
diff --git a/akka-docs/general/message-send-semantics.rst b/akka-docs/rst/general/message-send-semantics.rst
similarity index 100%
rename from akka-docs/general/message-send-semantics.rst
rename to akka-docs/rst/general/message-send-semantics.rst
diff --git a/akka-docs/general/remoting.rst b/akka-docs/rst/general/remoting.rst
similarity index 100%
rename from akka-docs/general/remoting.rst
rename to akka-docs/rst/general/remoting.rst
diff --git a/akka-docs/general/supervision.rst b/akka-docs/rst/general/supervision.rst
similarity index 100%
rename from akka-docs/general/supervision.rst
rename to akka-docs/rst/general/supervision.rst
diff --git a/akka-docs/images/akka-remote-testconductor.png b/akka-docs/rst/images/akka-remote-testconductor.png
similarity index 100%
rename from akka-docs/images/akka-remote-testconductor.png
rename to akka-docs/rst/images/akka-remote-testconductor.png
diff --git a/akka-docs/images/benchmark-akka-sample-trading-throughput.png b/akka-docs/rst/images/benchmark-akka-sample-trading-throughput.png
similarity index 100%
rename from akka-docs/images/benchmark-akka-sample-trading-throughput.png
rename to akka-docs/rst/images/benchmark-akka-sample-trading-throughput.png
diff --git a/akka-docs/images/build-path.png b/akka-docs/rst/images/build-path.png
similarity index 100%
rename from akka-docs/images/build-path.png
rename to akka-docs/rst/images/build-path.png
diff --git a/akka-docs/images/circuit-breaker-states.dot b/akka-docs/rst/images/circuit-breaker-states.dot
similarity index 100%
rename from akka-docs/images/circuit-breaker-states.dot
rename to akka-docs/rst/images/circuit-breaker-states.dot
diff --git a/akka-docs/images/circuit-breaker-states.png b/akka-docs/rst/images/circuit-breaker-states.png
similarity index 100%
rename from akka-docs/images/circuit-breaker-states.png
rename to akka-docs/rst/images/circuit-breaker-states.png
diff --git a/akka-docs/images/clojure-trees.png b/akka-docs/rst/images/clojure-trees.png
similarity index 100%
rename from akka-docs/images/clojure-trees.png
rename to akka-docs/rst/images/clojure-trees.png
diff --git a/akka-docs/images/diagnostics-window.png b/akka-docs/rst/images/diagnostics-window.png
similarity index 100%
rename from akka-docs/images/diagnostics-window.png
rename to akka-docs/rst/images/diagnostics-window.png
diff --git a/akka-docs/images/example-code.png b/akka-docs/rst/images/example-code.png
similarity index 100%
rename from akka-docs/images/example-code.png
rename to akka-docs/rst/images/example-code.png
diff --git a/akka-docs/images/faulttolerancesample-failure-flow.png b/akka-docs/rst/images/faulttolerancesample-failure-flow.png
similarity index 100%
rename from akka-docs/images/faulttolerancesample-failure-flow.png
rename to akka-docs/rst/images/faulttolerancesample-failure-flow.png
diff --git a/akka-docs/images/faulttolerancesample-normal-flow.png b/akka-docs/rst/images/faulttolerancesample-normal-flow.png
similarity index 100%
rename from akka-docs/images/faulttolerancesample-normal-flow.png
rename to akka-docs/rst/images/faulttolerancesample-normal-flow.png
diff --git a/akka-docs/images/faulttolerancesample.graffle b/akka-docs/rst/images/faulttolerancesample.graffle
similarity index 100%
rename from akka-docs/images/faulttolerancesample.graffle
rename to akka-docs/rst/images/faulttolerancesample.graffle
diff --git a/akka-docs/images/import-project.png b/akka-docs/rst/images/import-project.png
similarity index 100%
rename from akka-docs/images/import-project.png
rename to akka-docs/rst/images/import-project.png
diff --git a/akka-docs/images/install-beta2-updatesite.png b/akka-docs/rst/images/install-beta2-updatesite.png
similarity index 100%
rename from akka-docs/images/install-beta2-updatesite.png
rename to akka-docs/rst/images/install-beta2-updatesite.png
diff --git a/akka-docs/images/pi-formula.png b/akka-docs/rst/images/pi-formula.png
similarity index 100%
rename from akka-docs/images/pi-formula.png
rename to akka-docs/rst/images/pi-formula.png
diff --git a/akka-docs/images/quickfix.png b/akka-docs/rst/images/quickfix.png
similarity index 100%
rename from akka-docs/images/quickfix.png
rename to akka-docs/rst/images/quickfix.png
diff --git a/akka-docs/images/run-config.png b/akka-docs/rst/images/run-config.png
similarity index 100%
rename from akka-docs/images/run-config.png
rename to akka-docs/rst/images/run-config.png
diff --git a/akka-docs/index.rst b/akka-docs/rst/index.rst
similarity index 100%
rename from akka-docs/index.rst
rename to akka-docs/rst/index.rst
diff --git a/akka-docs/intro/deployment-scenarios.rst b/akka-docs/rst/intro/deployment-scenarios.rst
similarity index 100%
rename from akka-docs/intro/deployment-scenarios.rst
rename to akka-docs/rst/intro/deployment-scenarios.rst
diff --git a/akka-docs/intro/getting-started.rst b/akka-docs/rst/intro/getting-started.rst
similarity index 76%
rename from akka-docs/intro/getting-started.rst
rename to akka-docs/rst/intro/getting-started.rst
index 11b699fa8f..fdd6169abd 100644
--- a/akka-docs/intro/getting-started.rst
+++ b/akka-docs/rst/intro/getting-started.rst
@@ -29,18 +29,21 @@ Akka Maven repository.
Modules
-------
-Akka is very modular and has many JARs for containing different features.
+Akka is very modular and consists of several JARs containing different features.
-- ``akka-actor-2.1-SNAPSHOT.jar`` -- Classic Actors, Typed Actors, IO Actor etc.
-- ``akka-remote-2.1-SNAPSHOT.jar`` -- Remote Actors
-- ``akka-testkit-2.1-SNAPSHOT.jar`` -- Toolkit for testing Actor systems
-- ``akka-kernel-2.1-SNAPSHOT.jar`` -- Akka microkernel for running a bare-bones mini application server
-- ``akka-transactor-2.1-SNAPSHOT.jar`` -- Transactors - transactional actors, integrated with Scala STM
-- ``akka-agent-2.1-SNAPSHOT.jar`` -- Agents, integrated with Scala STM
-- ``akka-camel-2.1-SNAPSHOT.jar`` -- Apache Camel integration
-- ``akka-zeromq-2.1-SNAPSHOT.jar`` -- ZeroMQ integration
-- ``akka-slf4j-2.1-SNAPSHOT.jar`` -- SLF4J Event Handler Listener
-- ``akka--mailbox-2.1-SNAPSHOT.jar`` -- Akka durable mailboxes
+- ``akka-actor`` -- Classic Actors, Typed Actors, IO Actor etc.
+- ``akka-remote`` -- Remote Actors
+- ``akka-testkit`` -- Toolkit for testing Actor systems
+- ``akka-kernel`` -- Akka microkernel for running a bare-bones mini application server
+- ``akka-transactor`` -- Transactors - transactional actors, integrated with Scala STM
+- ``akka-agent`` -- Agents, integrated with Scala STM
+- ``akka-camel`` -- Apache Camel integration
+- ``akka-zeromq`` -- ZeroMQ integration
+- ``akka-slf4j`` -- SLF4J Event Handler Listener
+- ``akka-filebased-mailbox`` -- Akka durable mailbox (find more among community projects)
+
+The filename of the actual JAR is for example ``@jarName@`` (and analog for
+the other modules).
How to see the JARs dependencies of each Akka module is described in the
:ref:`dependencies` section.
@@ -84,26 +87,16 @@ The simplest way to get started with Akka and Maven is to check out the
`Akka/Maven template `_
project.
-Summary of the essential parts for using Akka with Maven:
-
-1) Add this repository to your ``pom.xml``:
-
-.. code-block:: xml
-
-
- typesafe
- Typesafe Repository
- http://repo.typesafe.com/typesafe/releases/
-
-
-2) Add the Akka dependencies. For example, here is the dependency for Akka Actor 2.1-SNAPSHOT:
+Since Akka is published to Maven Central (for versions since 2.1-M2), is it
+enough to add the Akka dependencies to the POM. For example, here is the
+dependency for akka-actor:
.. code-block:: xml
com.typesafe.akka
- akka-actor
- 2.1-SNAPSHOT
+ akka-actor_@binVersion@
+ @version@
**Note**: for snapshot versions both ``SNAPSHOT`` and timestamped versions are published.
@@ -128,11 +121,12 @@ SBT installation instructions on `https://github.com/harrah/xsbt/wiki/Setup `_.
Thanks for being a part of the Akka community.
+
diff --git a/akka-docs/intro/index.rst b/akka-docs/rst/intro/index.rst
similarity index 100%
rename from akka-docs/intro/index.rst
rename to akka-docs/rst/intro/index.rst
diff --git a/akka-docs/intro/use-cases.rst b/akka-docs/rst/intro/use-cases.rst
similarity index 100%
rename from akka-docs/intro/use-cases.rst
rename to akka-docs/rst/intro/use-cases.rst
diff --git a/akka-docs/intro/what-is-akka.rst b/akka-docs/rst/intro/what-is-akka.rst
similarity index 100%
rename from akka-docs/intro/what-is-akka.rst
rename to akka-docs/rst/intro/what-is-akka.rst
diff --git a/akka-docs/intro/why-akka.rst b/akka-docs/rst/intro/why-akka.rst
similarity index 100%
rename from akka-docs/intro/why-akka.rst
rename to akka-docs/rst/intro/why-akka.rst
diff --git a/akka-docs/java/agents.rst b/akka-docs/rst/java/agents.rst
similarity index 100%
rename from akka-docs/java/agents.rst
rename to akka-docs/rst/java/agents.rst
diff --git a/akka-docs/java/camel.rst b/akka-docs/rst/java/camel.rst
similarity index 100%
rename from akka-docs/java/camel.rst
rename to akka-docs/rst/java/camel.rst
diff --git a/akka-docs/java/code/docs/actor/FSMDocTest.scala b/akka-docs/rst/java/code/docs/actor/FSMDocTest.scala
similarity index 100%
rename from akka-docs/java/code/docs/actor/FSMDocTest.scala
rename to akka-docs/rst/java/code/docs/actor/FSMDocTest.scala
diff --git a/akka-docs/java/code/docs/actor/FSMDocTestBase.java b/akka-docs/rst/java/code/docs/actor/FSMDocTestBase.java
similarity index 100%
rename from akka-docs/java/code/docs/actor/FSMDocTestBase.java
rename to akka-docs/rst/java/code/docs/actor/FSMDocTestBase.java
diff --git a/akka-docs/java/code/docs/actor/FaultHandlingTest.scala b/akka-docs/rst/java/code/docs/actor/FaultHandlingTest.scala
similarity index 100%
rename from akka-docs/java/code/docs/actor/FaultHandlingTest.scala
rename to akka-docs/rst/java/code/docs/actor/FaultHandlingTest.scala
diff --git a/akka-docs/java/code/docs/actor/FaultHandlingTestBase.java b/akka-docs/rst/java/code/docs/actor/FaultHandlingTestBase.java
similarity index 100%
rename from akka-docs/java/code/docs/actor/FaultHandlingTestBase.java
rename to akka-docs/rst/java/code/docs/actor/FaultHandlingTestBase.java
diff --git a/akka-docs/java/code/docs/actor/FirstUntypedActor.java b/akka-docs/rst/java/code/docs/actor/FirstUntypedActor.java
similarity index 100%
rename from akka-docs/java/code/docs/actor/FirstUntypedActor.java
rename to akka-docs/rst/java/code/docs/actor/FirstUntypedActor.java
diff --git a/akka-docs/java/code/docs/actor/ImmutableMessage.java b/akka-docs/rst/java/code/docs/actor/ImmutableMessage.java
similarity index 100%
rename from akka-docs/java/code/docs/actor/ImmutableMessage.java
rename to akka-docs/rst/java/code/docs/actor/ImmutableMessage.java
diff --git a/akka-docs/java/code/docs/actor/MyReceivedTimeoutUntypedActor.java b/akka-docs/rst/java/code/docs/actor/MyReceivedTimeoutUntypedActor.java
similarity index 100%
rename from akka-docs/java/code/docs/actor/MyReceivedTimeoutUntypedActor.java
rename to akka-docs/rst/java/code/docs/actor/MyReceivedTimeoutUntypedActor.java
diff --git a/akka-docs/java/code/docs/actor/MyUntypedActor.java b/akka-docs/rst/java/code/docs/actor/MyUntypedActor.java
similarity index 100%
rename from akka-docs/java/code/docs/actor/MyUntypedActor.java
rename to akka-docs/rst/java/code/docs/actor/MyUntypedActor.java
diff --git a/akka-docs/java/code/docs/actor/SchedulerDocTest.scala b/akka-docs/rst/java/code/docs/actor/SchedulerDocTest.scala
similarity index 100%
rename from akka-docs/java/code/docs/actor/SchedulerDocTest.scala
rename to akka-docs/rst/java/code/docs/actor/SchedulerDocTest.scala
diff --git a/akka-docs/java/code/docs/actor/SchedulerDocTestBase.java b/akka-docs/rst/java/code/docs/actor/SchedulerDocTestBase.java
similarity index 100%
rename from akka-docs/java/code/docs/actor/SchedulerDocTestBase.java
rename to akka-docs/rst/java/code/docs/actor/SchedulerDocTestBase.java
diff --git a/akka-docs/java/code/docs/actor/TypedActorDocTest.scala b/akka-docs/rst/java/code/docs/actor/TypedActorDocTest.scala
similarity index 100%
rename from akka-docs/java/code/docs/actor/TypedActorDocTest.scala
rename to akka-docs/rst/java/code/docs/actor/TypedActorDocTest.scala
diff --git a/akka-docs/java/code/docs/actor/TypedActorDocTestBase.java b/akka-docs/rst/java/code/docs/actor/TypedActorDocTestBase.java
similarity index 100%
rename from akka-docs/java/code/docs/actor/TypedActorDocTestBase.java
rename to akka-docs/rst/java/code/docs/actor/TypedActorDocTestBase.java
diff --git a/akka-docs/java/code/docs/actor/UntypedActorDocTest.scala b/akka-docs/rst/java/code/docs/actor/UntypedActorDocTest.scala
similarity index 100%
rename from akka-docs/java/code/docs/actor/UntypedActorDocTest.scala
rename to akka-docs/rst/java/code/docs/actor/UntypedActorDocTest.scala
diff --git a/akka-docs/java/code/docs/actor/UntypedActorDocTestBase.java b/akka-docs/rst/java/code/docs/actor/UntypedActorDocTestBase.java
similarity index 100%
rename from akka-docs/java/code/docs/actor/UntypedActorDocTestBase.java
rename to akka-docs/rst/java/code/docs/actor/UntypedActorDocTestBase.java
diff --git a/akka-docs/java/code/docs/actor/UntypedActorSwapper.java b/akka-docs/rst/java/code/docs/actor/UntypedActorSwapper.java
similarity index 100%
rename from akka-docs/java/code/docs/actor/UntypedActorSwapper.java
rename to akka-docs/rst/java/code/docs/actor/UntypedActorSwapper.java
diff --git a/akka-docs/java/code/docs/actor/japi/FaultHandlingDocSample.java b/akka-docs/rst/java/code/docs/actor/japi/FaultHandlingDocSample.java
similarity index 100%
rename from akka-docs/java/code/docs/actor/japi/FaultHandlingDocSample.java
rename to akka-docs/rst/java/code/docs/actor/japi/FaultHandlingDocSample.java
diff --git a/akka-docs/java/code/docs/agent/AgentDocJavaSpec.scala b/akka-docs/rst/java/code/docs/agent/AgentDocJavaSpec.scala
similarity index 100%
rename from akka-docs/java/code/docs/agent/AgentDocJavaSpec.scala
rename to akka-docs/rst/java/code/docs/agent/AgentDocJavaSpec.scala
diff --git a/akka-docs/java/code/docs/agent/AgentDocTest.java b/akka-docs/rst/java/code/docs/agent/AgentDocTest.java
similarity index 100%
rename from akka-docs/java/code/docs/agent/AgentDocTest.java
rename to akka-docs/rst/java/code/docs/agent/AgentDocTest.java
diff --git a/akka-docs/java/code/docs/camel/ActivationTestBase.java b/akka-docs/rst/java/code/docs/camel/ActivationTestBase.java
similarity index 100%
rename from akka-docs/java/code/docs/camel/ActivationTestBase.java
rename to akka-docs/rst/java/code/docs/camel/ActivationTestBase.java
diff --git a/akka-docs/java/code/docs/camel/CamelExtensionDocTest.scala b/akka-docs/rst/java/code/docs/camel/CamelExtensionDocTest.scala
similarity index 100%
rename from akka-docs/java/code/docs/camel/CamelExtensionDocTest.scala
rename to akka-docs/rst/java/code/docs/camel/CamelExtensionDocTest.scala
diff --git a/akka-docs/java/code/docs/camel/CamelExtensionTestBase.java b/akka-docs/rst/java/code/docs/camel/CamelExtensionTestBase.java
similarity index 100%
rename from akka-docs/java/code/docs/camel/CamelExtensionTestBase.java
rename to akka-docs/rst/java/code/docs/camel/CamelExtensionTestBase.java
diff --git a/akka-docs/java/code/docs/camel/Consumer1.java b/akka-docs/rst/java/code/docs/camel/Consumer1.java
similarity index 100%
rename from akka-docs/java/code/docs/camel/Consumer1.java
rename to akka-docs/rst/java/code/docs/camel/Consumer1.java
diff --git a/akka-docs/java/code/docs/camel/Consumer2.java b/akka-docs/rst/java/code/docs/camel/Consumer2.java
similarity index 100%
rename from akka-docs/java/code/docs/camel/Consumer2.java
rename to akka-docs/rst/java/code/docs/camel/Consumer2.java
diff --git a/akka-docs/java/code/docs/camel/Consumer3.java b/akka-docs/rst/java/code/docs/camel/Consumer3.java
similarity index 100%
rename from akka-docs/java/code/docs/camel/Consumer3.java
rename to akka-docs/rst/java/code/docs/camel/Consumer3.java
diff --git a/akka-docs/java/code/docs/camel/Consumer4.java b/akka-docs/rst/java/code/docs/camel/Consumer4.java
similarity index 100%
rename from akka-docs/java/code/docs/camel/Consumer4.java
rename to akka-docs/rst/java/code/docs/camel/Consumer4.java
diff --git a/akka-docs/java/code/docs/camel/CustomRouteBuilder.java b/akka-docs/rst/java/code/docs/camel/CustomRouteBuilder.java
similarity index 100%
rename from akka-docs/java/code/docs/camel/CustomRouteBuilder.java
rename to akka-docs/rst/java/code/docs/camel/CustomRouteBuilder.java
diff --git a/akka-docs/java/code/docs/camel/CustomRouteTestBase.java b/akka-docs/rst/java/code/docs/camel/CustomRouteTestBase.java
similarity index 100%
rename from akka-docs/java/code/docs/camel/CustomRouteTestBase.java
rename to akka-docs/rst/java/code/docs/camel/CustomRouteTestBase.java
diff --git a/akka-docs/java/code/docs/camel/ErrorThrowingConsumer.java b/akka-docs/rst/java/code/docs/camel/ErrorThrowingConsumer.java
similarity index 100%
rename from akka-docs/java/code/docs/camel/ErrorThrowingConsumer.java
rename to akka-docs/rst/java/code/docs/camel/ErrorThrowingConsumer.java
diff --git a/akka-docs/java/code/docs/camel/FirstProducer.java b/akka-docs/rst/java/code/docs/camel/FirstProducer.java
similarity index 100%
rename from akka-docs/java/code/docs/camel/FirstProducer.java
rename to akka-docs/rst/java/code/docs/camel/FirstProducer.java
diff --git a/akka-docs/java/code/docs/camel/Forwarder.java b/akka-docs/rst/java/code/docs/camel/Forwarder.java
similarity index 100%
rename from akka-docs/java/code/docs/camel/Forwarder.java
rename to akka-docs/rst/java/code/docs/camel/Forwarder.java
diff --git a/akka-docs/java/code/docs/camel/MyActor.java b/akka-docs/rst/java/code/docs/camel/MyActor.java
similarity index 100%
rename from akka-docs/java/code/docs/camel/MyActor.java
rename to akka-docs/rst/java/code/docs/camel/MyActor.java
diff --git a/akka-docs/java/code/docs/camel/MyEndpoint.java b/akka-docs/rst/java/code/docs/camel/MyEndpoint.java
similarity index 100%
rename from akka-docs/java/code/docs/camel/MyEndpoint.java
rename to akka-docs/rst/java/code/docs/camel/MyEndpoint.java
diff --git a/akka-docs/java/code/docs/camel/OnRouteResponseTestBase.java b/akka-docs/rst/java/code/docs/camel/OnRouteResponseTestBase.java
similarity index 100%
rename from akka-docs/java/code/docs/camel/OnRouteResponseTestBase.java
rename to akka-docs/rst/java/code/docs/camel/OnRouteResponseTestBase.java
diff --git a/akka-docs/java/code/docs/camel/OnewaySender.java b/akka-docs/rst/java/code/docs/camel/OnewaySender.java
similarity index 100%
rename from akka-docs/java/code/docs/camel/OnewaySender.java
rename to akka-docs/rst/java/code/docs/camel/OnewaySender.java
diff --git a/akka-docs/java/code/docs/camel/Orders.java b/akka-docs/rst/java/code/docs/camel/Orders.java
similarity index 100%
rename from akka-docs/java/code/docs/camel/Orders.java
rename to akka-docs/rst/java/code/docs/camel/Orders.java
diff --git a/akka-docs/java/code/docs/camel/Producer1.java b/akka-docs/rst/java/code/docs/camel/Producer1.java
similarity index 100%
rename from akka-docs/java/code/docs/camel/Producer1.java
rename to akka-docs/rst/java/code/docs/camel/Producer1.java
diff --git a/akka-docs/java/code/docs/camel/ProducerTestBase.java b/akka-docs/rst/java/code/docs/camel/ProducerTestBase.java
similarity index 100%
rename from akka-docs/java/code/docs/camel/ProducerTestBase.java
rename to akka-docs/rst/java/code/docs/camel/ProducerTestBase.java
diff --git a/akka-docs/java/code/docs/camel/RequestBodyActor.java b/akka-docs/rst/java/code/docs/camel/RequestBodyActor.java
similarity index 100%
rename from akka-docs/java/code/docs/camel/RequestBodyActor.java
rename to akka-docs/rst/java/code/docs/camel/RequestBodyActor.java
diff --git a/akka-docs/java/code/docs/camel/Responder.java b/akka-docs/rst/java/code/docs/camel/Responder.java
similarity index 100%
rename from akka-docs/java/code/docs/camel/Responder.java
rename to akka-docs/rst/java/code/docs/camel/Responder.java
diff --git a/akka-docs/java/code/docs/camel/ResponseReceiver.java b/akka-docs/rst/java/code/docs/camel/ResponseReceiver.java
similarity index 100%
rename from akka-docs/java/code/docs/camel/ResponseReceiver.java
rename to akka-docs/rst/java/code/docs/camel/ResponseReceiver.java
diff --git a/akka-docs/java/code/docs/camel/Transformer.java b/akka-docs/rst/java/code/docs/camel/Transformer.java
similarity index 100%
rename from akka-docs/java/code/docs/camel/Transformer.java
rename to akka-docs/rst/java/code/docs/camel/Transformer.java
diff --git a/akka-docs/java/code/docs/camel/sample/http/HttpConsumer.java b/akka-docs/rst/java/code/docs/camel/sample/http/HttpConsumer.java
similarity index 100%
rename from akka-docs/java/code/docs/camel/sample/http/HttpConsumer.java
rename to akka-docs/rst/java/code/docs/camel/sample/http/HttpConsumer.java
diff --git a/akka-docs/java/code/docs/camel/sample/http/HttpProducer.java b/akka-docs/rst/java/code/docs/camel/sample/http/HttpProducer.java
similarity index 100%
rename from akka-docs/java/code/docs/camel/sample/http/HttpProducer.java
rename to akka-docs/rst/java/code/docs/camel/sample/http/HttpProducer.java
diff --git a/akka-docs/java/code/docs/camel/sample/http/HttpSample.java b/akka-docs/rst/java/code/docs/camel/sample/http/HttpSample.java
similarity index 100%
rename from akka-docs/java/code/docs/camel/sample/http/HttpSample.java
rename to akka-docs/rst/java/code/docs/camel/sample/http/HttpSample.java
diff --git a/akka-docs/java/code/docs/camel/sample/http/HttpTransformer.java b/akka-docs/rst/java/code/docs/camel/sample/http/HttpTransformer.java
similarity index 100%
rename from akka-docs/java/code/docs/camel/sample/http/HttpTransformer.java
rename to akka-docs/rst/java/code/docs/camel/sample/http/HttpTransformer.java
diff --git a/akka-docs/java/code/docs/camel/sample/quartz/MyQuartzActor.java b/akka-docs/rst/java/code/docs/camel/sample/quartz/MyQuartzActor.java
similarity index 100%
rename from akka-docs/java/code/docs/camel/sample/quartz/MyQuartzActor.java
rename to akka-docs/rst/java/code/docs/camel/sample/quartz/MyQuartzActor.java
diff --git a/akka-docs/java/code/docs/camel/sample/quartz/QuartzSample.java b/akka-docs/rst/java/code/docs/camel/sample/quartz/QuartzSample.java
similarity index 100%
rename from akka-docs/java/code/docs/camel/sample/quartz/QuartzSample.java
rename to akka-docs/rst/java/code/docs/camel/sample/quartz/QuartzSample.java
diff --git a/akka-docs/java/code/docs/camel/sample/route/Consumer3.java b/akka-docs/rst/java/code/docs/camel/sample/route/Consumer3.java
similarity index 100%
rename from akka-docs/java/code/docs/camel/sample/route/Consumer3.java
rename to akka-docs/rst/java/code/docs/camel/sample/route/Consumer3.java
diff --git a/akka-docs/java/code/docs/camel/sample/route/CustomRouteBuilder.java b/akka-docs/rst/java/code/docs/camel/sample/route/CustomRouteBuilder.java
similarity index 100%
rename from akka-docs/java/code/docs/camel/sample/route/CustomRouteBuilder.java
rename to akka-docs/rst/java/code/docs/camel/sample/route/CustomRouteBuilder.java
diff --git a/akka-docs/java/code/docs/camel/sample/route/CustomRouteSample.java b/akka-docs/rst/java/code/docs/camel/sample/route/CustomRouteSample.java
similarity index 100%
rename from akka-docs/java/code/docs/camel/sample/route/CustomRouteSample.java
rename to akka-docs/rst/java/code/docs/camel/sample/route/CustomRouteSample.java
diff --git a/akka-docs/java/code/docs/camel/sample/route/Producer1.java b/akka-docs/rst/java/code/docs/camel/sample/route/Producer1.java
similarity index 100%
rename from akka-docs/java/code/docs/camel/sample/route/Producer1.java
rename to akka-docs/rst/java/code/docs/camel/sample/route/Producer1.java
diff --git a/akka-docs/java/code/docs/camel/sample/route/Transformer.java b/akka-docs/rst/java/code/docs/camel/sample/route/Transformer.java
similarity index 100%
rename from akka-docs/java/code/docs/camel/sample/route/Transformer.java
rename to akka-docs/rst/java/code/docs/camel/sample/route/Transformer.java
diff --git a/akka-docs/java/code/docs/dispatcher/DispatcherDocTest.scala b/akka-docs/rst/java/code/docs/dispatcher/DispatcherDocTest.scala
similarity index 100%
rename from akka-docs/java/code/docs/dispatcher/DispatcherDocTest.scala
rename to akka-docs/rst/java/code/docs/dispatcher/DispatcherDocTest.scala
diff --git a/akka-docs/java/code/docs/dispatcher/DispatcherDocTestBase.java b/akka-docs/rst/java/code/docs/dispatcher/DispatcherDocTestBase.java
similarity index 100%
rename from akka-docs/java/code/docs/dispatcher/DispatcherDocTestBase.java
rename to akka-docs/rst/java/code/docs/dispatcher/DispatcherDocTestBase.java
diff --git a/akka-docs/java/code/docs/event/LoggingDocTest.scala b/akka-docs/rst/java/code/docs/event/LoggingDocTest.scala
similarity index 100%
rename from akka-docs/java/code/docs/event/LoggingDocTest.scala
rename to akka-docs/rst/java/code/docs/event/LoggingDocTest.scala
diff --git a/akka-docs/java/code/docs/event/LoggingDocTestBase.java b/akka-docs/rst/java/code/docs/event/LoggingDocTestBase.java
similarity index 100%
rename from akka-docs/java/code/docs/event/LoggingDocTestBase.java
rename to akka-docs/rst/java/code/docs/event/LoggingDocTestBase.java
diff --git a/akka-docs/java/code/docs/extension/ExtensionDocTest.scala b/akka-docs/rst/java/code/docs/extension/ExtensionDocTest.scala
similarity index 100%
rename from akka-docs/java/code/docs/extension/ExtensionDocTest.scala
rename to akka-docs/rst/java/code/docs/extension/ExtensionDocTest.scala
diff --git a/akka-docs/java/code/docs/extension/ExtensionDocTestBase.java b/akka-docs/rst/java/code/docs/extension/ExtensionDocTestBase.java
similarity index 100%
rename from akka-docs/java/code/docs/extension/ExtensionDocTestBase.java
rename to akka-docs/rst/java/code/docs/extension/ExtensionDocTestBase.java
diff --git a/akka-docs/java/code/docs/extension/SettingsExtensionDocTest.scala b/akka-docs/rst/java/code/docs/extension/SettingsExtensionDocTest.scala
similarity index 100%
rename from akka-docs/java/code/docs/extension/SettingsExtensionDocTest.scala
rename to akka-docs/rst/java/code/docs/extension/SettingsExtensionDocTest.scala
diff --git a/akka-docs/java/code/docs/extension/SettingsExtensionDocTestBase.java b/akka-docs/rst/java/code/docs/extension/SettingsExtensionDocTestBase.java
similarity index 100%
rename from akka-docs/java/code/docs/extension/SettingsExtensionDocTestBase.java
rename to akka-docs/rst/java/code/docs/extension/SettingsExtensionDocTestBase.java
diff --git a/akka-docs/java/code/docs/future/FutureDocTest.scala b/akka-docs/rst/java/code/docs/future/FutureDocTest.scala
similarity index 100%
rename from akka-docs/java/code/docs/future/FutureDocTest.scala
rename to akka-docs/rst/java/code/docs/future/FutureDocTest.scala
diff --git a/akka-docs/java/code/docs/future/FutureDocTestBase.java b/akka-docs/rst/java/code/docs/future/FutureDocTestBase.java
similarity index 100%
rename from akka-docs/java/code/docs/future/FutureDocTestBase.java
rename to akka-docs/rst/java/code/docs/future/FutureDocTestBase.java
diff --git a/akka-docs/java/code/docs/jrouting/ConsistentHashingRouterDocTest.scala b/akka-docs/rst/java/code/docs/jrouting/ConsistentHashingRouterDocTest.scala
similarity index 100%
rename from akka-docs/java/code/docs/jrouting/ConsistentHashingRouterDocTest.scala
rename to akka-docs/rst/java/code/docs/jrouting/ConsistentHashingRouterDocTest.scala
diff --git a/akka-docs/java/code/docs/jrouting/ConsistentHashingRouterDocTestBase.java b/akka-docs/rst/java/code/docs/jrouting/ConsistentHashingRouterDocTestBase.java
similarity index 100%
rename from akka-docs/java/code/docs/jrouting/ConsistentHashingRouterDocTestBase.java
rename to akka-docs/rst/java/code/docs/jrouting/ConsistentHashingRouterDocTestBase.java
diff --git a/akka-docs/java/code/docs/jrouting/CustomRouterDocTest.scala b/akka-docs/rst/java/code/docs/jrouting/CustomRouterDocTest.scala
similarity index 100%
rename from akka-docs/java/code/docs/jrouting/CustomRouterDocTest.scala
rename to akka-docs/rst/java/code/docs/jrouting/CustomRouterDocTest.scala
diff --git a/akka-docs/java/code/docs/jrouting/CustomRouterDocTestBase.java b/akka-docs/rst/java/code/docs/jrouting/CustomRouterDocTestBase.java
similarity index 100%
rename from akka-docs/java/code/docs/jrouting/CustomRouterDocTestBase.java
rename to akka-docs/rst/java/code/docs/jrouting/CustomRouterDocTestBase.java
diff --git a/akka-docs/java/code/docs/jrouting/FibonacciActor.java b/akka-docs/rst/java/code/docs/jrouting/FibonacciActor.java
similarity index 100%
rename from akka-docs/java/code/docs/jrouting/FibonacciActor.java
rename to akka-docs/rst/java/code/docs/jrouting/FibonacciActor.java
diff --git a/akka-docs/java/code/docs/jrouting/ParentActor.java b/akka-docs/rst/java/code/docs/jrouting/ParentActor.java
similarity index 100%
rename from akka-docs/java/code/docs/jrouting/ParentActor.java
rename to akka-docs/rst/java/code/docs/jrouting/ParentActor.java
diff --git a/akka-docs/java/code/docs/jrouting/PrintlnActor.java b/akka-docs/rst/java/code/docs/jrouting/PrintlnActor.java
similarity index 100%
rename from akka-docs/java/code/docs/jrouting/PrintlnActor.java
rename to akka-docs/rst/java/code/docs/jrouting/PrintlnActor.java
diff --git a/akka-docs/java/code/docs/jrouting/RouterViaConfigExample.java b/akka-docs/rst/java/code/docs/jrouting/RouterViaConfigExample.java
similarity index 100%
rename from akka-docs/java/code/docs/jrouting/RouterViaConfigExample.java
rename to akka-docs/rst/java/code/docs/jrouting/RouterViaConfigExample.java
diff --git a/akka-docs/java/code/docs/jrouting/RouterViaProgramExample.java b/akka-docs/rst/java/code/docs/jrouting/RouterViaProgramExample.java
similarity index 100%
rename from akka-docs/java/code/docs/jrouting/RouterViaProgramExample.java
rename to akka-docs/rst/java/code/docs/jrouting/RouterViaProgramExample.java
diff --git a/akka-docs/java/code/docs/pattern/JavaTemplate.java b/akka-docs/rst/java/code/docs/pattern/JavaTemplate.java
similarity index 100%
rename from akka-docs/java/code/docs/pattern/JavaTemplate.java
rename to akka-docs/rst/java/code/docs/pattern/JavaTemplate.java
diff --git a/akka-docs/java/code/docs/remoting/RemoteDeploymentDocTest.scala b/akka-docs/rst/java/code/docs/remoting/RemoteDeploymentDocTest.scala
similarity index 100%
rename from akka-docs/java/code/docs/remoting/RemoteDeploymentDocTest.scala
rename to akka-docs/rst/java/code/docs/remoting/RemoteDeploymentDocTest.scala
diff --git a/akka-docs/java/code/docs/remoting/RemoteDeploymentDocTestBase.java b/akka-docs/rst/java/code/docs/remoting/RemoteDeploymentDocTestBase.java
similarity index 100%
rename from akka-docs/java/code/docs/remoting/RemoteDeploymentDocTestBase.java
rename to akka-docs/rst/java/code/docs/remoting/RemoteDeploymentDocTestBase.java
diff --git a/akka-docs/java/code/docs/serialization/SerializationDocTest.scala b/akka-docs/rst/java/code/docs/serialization/SerializationDocTest.scala
similarity index 100%
rename from akka-docs/java/code/docs/serialization/SerializationDocTest.scala
rename to akka-docs/rst/java/code/docs/serialization/SerializationDocTest.scala
diff --git a/akka-docs/java/code/docs/serialization/SerializationDocTestBase.java b/akka-docs/rst/java/code/docs/serialization/SerializationDocTestBase.java
similarity index 100%
rename from akka-docs/java/code/docs/serialization/SerializationDocTestBase.java
rename to akka-docs/rst/java/code/docs/serialization/SerializationDocTestBase.java
diff --git a/akka-docs/java/code/docs/testkit/TestKitDocTest.java b/akka-docs/rst/java/code/docs/testkit/TestKitDocTest.java
similarity index 100%
rename from akka-docs/java/code/docs/testkit/TestKitDocTest.java
rename to akka-docs/rst/java/code/docs/testkit/TestKitDocTest.java
diff --git a/akka-docs/java/code/docs/testkit/TestKitSampleTest.java b/akka-docs/rst/java/code/docs/testkit/TestKitSampleTest.java
similarity index 100%
rename from akka-docs/java/code/docs/testkit/TestKitSampleTest.java
rename to akka-docs/rst/java/code/docs/testkit/TestKitSampleTest.java
diff --git a/akka-docs/java/code/docs/transactor/CoordinatedCounter.java b/akka-docs/rst/java/code/docs/transactor/CoordinatedCounter.java
similarity index 100%
rename from akka-docs/java/code/docs/transactor/CoordinatedCounter.java
rename to akka-docs/rst/java/code/docs/transactor/CoordinatedCounter.java
diff --git a/akka-docs/java/code/docs/transactor/Coordinator.java b/akka-docs/rst/java/code/docs/transactor/Coordinator.java
similarity index 100%
rename from akka-docs/java/code/docs/transactor/Coordinator.java
rename to akka-docs/rst/java/code/docs/transactor/Coordinator.java
diff --git a/akka-docs/java/code/docs/transactor/Counter.java b/akka-docs/rst/java/code/docs/transactor/Counter.java
similarity index 100%
rename from akka-docs/java/code/docs/transactor/Counter.java
rename to akka-docs/rst/java/code/docs/transactor/Counter.java
diff --git a/akka-docs/java/code/docs/transactor/FriendlyCounter.java b/akka-docs/rst/java/code/docs/transactor/FriendlyCounter.java
similarity index 100%
rename from akka-docs/java/code/docs/transactor/FriendlyCounter.java
rename to akka-docs/rst/java/code/docs/transactor/FriendlyCounter.java
diff --git a/akka-docs/java/code/docs/transactor/Increment.java b/akka-docs/rst/java/code/docs/transactor/Increment.java
similarity index 100%
rename from akka-docs/java/code/docs/transactor/Increment.java
rename to akka-docs/rst/java/code/docs/transactor/Increment.java
diff --git a/akka-docs/java/code/docs/transactor/Message.java b/akka-docs/rst/java/code/docs/transactor/Message.java
similarity index 100%
rename from akka-docs/java/code/docs/transactor/Message.java
rename to akka-docs/rst/java/code/docs/transactor/Message.java
diff --git a/akka-docs/java/code/docs/transactor/TransactorDocJavaSpec.scala b/akka-docs/rst/java/code/docs/transactor/TransactorDocJavaSpec.scala
similarity index 100%
rename from akka-docs/java/code/docs/transactor/TransactorDocJavaSpec.scala
rename to akka-docs/rst/java/code/docs/transactor/TransactorDocJavaSpec.scala
diff --git a/akka-docs/java/code/docs/transactor/TransactorDocTest.java b/akka-docs/rst/java/code/docs/transactor/TransactorDocTest.java
similarity index 100%
rename from akka-docs/java/code/docs/transactor/TransactorDocTest.java
rename to akka-docs/rst/java/code/docs/transactor/TransactorDocTest.java
diff --git a/akka-docs/java/code/docs/zeromq/ZeromqDocTest.scala b/akka-docs/rst/java/code/docs/zeromq/ZeromqDocTest.scala
similarity index 100%
rename from akka-docs/java/code/docs/zeromq/ZeromqDocTest.scala
rename to akka-docs/rst/java/code/docs/zeromq/ZeromqDocTest.scala
diff --git a/akka-docs/java/code/docs/zeromq/ZeromqDocTestBase.java b/akka-docs/rst/java/code/docs/zeromq/ZeromqDocTestBase.java
similarity index 100%
rename from akka-docs/java/code/docs/zeromq/ZeromqDocTestBase.java
rename to akka-docs/rst/java/code/docs/zeromq/ZeromqDocTestBase.java
diff --git a/akka-docs/java/dispatchers.rst b/akka-docs/rst/java/dispatchers.rst
similarity index 100%
rename from akka-docs/java/dispatchers.rst
rename to akka-docs/rst/java/dispatchers.rst
diff --git a/akka-docs/java/event-bus.rst b/akka-docs/rst/java/event-bus.rst
similarity index 100%
rename from akka-docs/java/event-bus.rst
rename to akka-docs/rst/java/event-bus.rst
diff --git a/akka-docs/java/extending-akka.rst b/akka-docs/rst/java/extending-akka.rst
similarity index 100%
rename from akka-docs/java/extending-akka.rst
rename to akka-docs/rst/java/extending-akka.rst
diff --git a/akka-docs/java/fault-tolerance-sample.rst b/akka-docs/rst/java/fault-tolerance-sample.rst
similarity index 100%
rename from akka-docs/java/fault-tolerance-sample.rst
rename to akka-docs/rst/java/fault-tolerance-sample.rst
diff --git a/akka-docs/java/fault-tolerance.rst b/akka-docs/rst/java/fault-tolerance.rst
similarity index 100%
rename from akka-docs/java/fault-tolerance.rst
rename to akka-docs/rst/java/fault-tolerance.rst
diff --git a/akka-docs/java/fsm.rst b/akka-docs/rst/java/fsm.rst
similarity index 100%
rename from akka-docs/java/fsm.rst
rename to akka-docs/rst/java/fsm.rst
diff --git a/akka-docs/java/futures.rst b/akka-docs/rst/java/futures.rst
similarity index 100%
rename from akka-docs/java/futures.rst
rename to akka-docs/rst/java/futures.rst
diff --git a/akka-docs/java/howto.rst b/akka-docs/rst/java/howto.rst
similarity index 100%
rename from akka-docs/java/howto.rst
rename to akka-docs/rst/java/howto.rst
diff --git a/akka-docs/java/index.rst b/akka-docs/rst/java/index.rst
similarity index 100%
rename from akka-docs/java/index.rst
rename to akka-docs/rst/java/index.rst
diff --git a/akka-docs/java/logging.rst b/akka-docs/rst/java/logging.rst
similarity index 100%
rename from akka-docs/java/logging.rst
rename to akka-docs/rst/java/logging.rst
diff --git a/akka-docs/java/microkernel.rst b/akka-docs/rst/java/microkernel.rst
similarity index 90%
rename from akka-docs/java/microkernel.rst
rename to akka-docs/rst/java/microkernel.rst
index 970b174549..3d89c5c7e6 100644
--- a/akka-docs/java/microkernel.rst
+++ b/akka-docs/rst/java/microkernel.rst
@@ -36,7 +36,7 @@ On a Windows machine you can also use the bin/akka.bat script.
The code for the Hello Kernel example (see the ``HelloKernel`` class for an example
of creating a Bootable):
-.. includecode:: ../../akka-samples/akka-sample-hello-kernel/src/main/java/sample/kernel/hello/java/HelloKernel.java
+.. includecode:: ../../../akka-samples/akka-sample-hello-kernel/src/main/java/sample/kernel/hello/java/HelloKernel.java
Distribution of microkernel application
@@ -48,12 +48,12 @@ start scripts.
To use the sbt plugin you define it in your ``project/plugins.sbt``:
-.. includecode:: ../../akka-sbt-plugin/sample/project/plugins.sbt
+.. includecode:: ../../../akka-sbt-plugin/sample/project/plugins.sbt
Then you add it to the settings of your ``project/Build.scala``. It is also important that you add the ``akka-kernel`` dependency.
This is an example of a complete sbt build file:
-.. includecode:: ../../akka-sbt-plugin/sample/project/Build.scala
+.. includecode:: ../../../akka-sbt-plugin/sample/project/Build.scala
Run the plugin with sbt::
diff --git a/akka-docs/java/remoting.rst b/akka-docs/rst/java/remoting.rst
similarity index 89%
rename from akka-docs/java/remoting.rst
rename to akka-docs/rst/java/remoting.rst
index faa568a428..a0406c149d 100644
--- a/akka-docs/java/remoting.rst
+++ b/akka-docs/rst/java/remoting.rst
@@ -13,8 +13,8 @@ The Akka remoting is a separate jar file. Make sure that you have the following
com.typesafe.akka
- akka-remote
- 2.1-SNAPSHOT
+ akka-remote_@binVersion@
+ @version@
To enable remote capabilities in your Akka project you should, at a minimum, add the following changes
@@ -57,7 +57,7 @@ The example above only illustrates the bare minimum of properties you have to ad
There are lots of more properties that are related to remoting in Akka. We refer to the following
reference file for more information:
-.. literalinclude:: ../../akka-remote/src/main/resources/reference.conf
+.. literalinclude:: ../../../akka-remote/src/main/resources/reference.conf
:language: none
Looking up Remote Actors
@@ -191,7 +191,7 @@ This sample demonstrates both, remote deployment and look-up of remote actors.
First, let us have a look at the common setup for both scenarios (this is
``common.conf``):
-.. includecode:: ../../akka-samples/akka-sample-remote/src/main/resources/common.conf
+.. includecode:: ../../../akka-samples/akka-sample-remote/src/main/resources/common.conf
This enables the remoting by installing the :class:`RemoteActorRefProvider` and
chooses the default remote transport. All other options will be set
@@ -211,39 +211,39 @@ In order to look up a remote actor, that one must be created first. For this
purpose, we configure an actor system to listen on port 2552 (this is a snippet
from ``application.conf``):
-.. includecode:: ../../akka-samples/akka-sample-remote/src/main/resources/application.conf
+.. includecode:: ../../../akka-samples/akka-sample-remote/src/main/resources/application.conf
:include: calculator
Then the actor must be created. For all code which follows, assume these imports:
-.. includecode:: ../../akka-samples/akka-sample-remote/src/main/java/sample/remote/calculator/java/JLookupApplication.java
+.. includecode:: ../../../akka-samples/akka-sample-remote/src/main/java/sample/remote/calculator/java/JLookupApplication.java
:include: imports
The actor doing the work will be this one:
-.. includecode:: ../../akka-samples/akka-sample-remote/src/main/java/sample/remote/calculator/java/JSimpleCalculatorActor.java
+.. includecode:: ../../../akka-samples/akka-sample-remote/src/main/java/sample/remote/calculator/java/JSimpleCalculatorActor.java
:include: actor
and we start it within an actor system using the above configuration
-.. includecode:: ../../akka-samples/akka-sample-remote/src/main/java/sample/remote/calculator/java/JCalculatorApplication.java
+.. includecode:: ../../../akka-samples/akka-sample-remote/src/main/java/sample/remote/calculator/java/JCalculatorApplication.java
:include: setup
With the service actor up and running, we may look it up from another actor
system, which will be configured to use port 2553 (this is a snippet from
``application.conf``).
-.. includecode:: ../../akka-samples/akka-sample-remote/src/main/resources/application.conf
+.. includecode:: ../../../akka-samples/akka-sample-remote/src/main/resources/application.conf
:include: remotelookup
The actor which will query the calculator is a quite simple one for demonstration purposes
-.. includecode:: ../../akka-samples/akka-sample-remote/src/main/java/sample/remote/calculator/java/JLookupActor.java
+.. includecode:: ../../../akka-samples/akka-sample-remote/src/main/java/sample/remote/calculator/java/JLookupActor.java
:include: actor
and it is created from an actor system using the aforementioned client’s config.
-.. includecode:: ../../akka-samples/akka-sample-remote/src/main/java/sample/remote/calculator/java/JLookupApplication.java
+.. includecode:: ../../../akka-samples/akka-sample-remote/src/main/java/sample/remote/calculator/java/JLookupApplication.java
:include: setup
Requests which come in via ``doSomething`` will be sent to the client actor
@@ -259,27 +259,27 @@ Creating remote actors instead of looking them up is not visible in the source
code, only in the configuration file. This section is used in this scenario
(this is a snippet from ``application.conf``):
-.. includecode:: ../../akka-samples/akka-sample-remote/src/main/resources/application.conf
+.. includecode:: ../../../akka-samples/akka-sample-remote/src/main/resources/application.conf
:include: remotecreation
For all code which follows, assume these imports:
-.. includecode:: ../../akka-samples/akka-sample-remote/src/main/java/sample/remote/calculator/java/JLookupApplication.java
+.. includecode:: ../../../akka-samples/akka-sample-remote/src/main/java/sample/remote/calculator/java/JLookupApplication.java
:include: imports
The server actor can multiply or divide numbers:
-.. includecode:: ../../akka-samples/akka-sample-remote/src/main/java/sample/remote/calculator/java/JAdvancedCalculatorActor.java
+.. includecode:: ../../../akka-samples/akka-sample-remote/src/main/java/sample/remote/calculator/java/JAdvancedCalculatorActor.java
:include: actor
The client actor looks like in the previous example
-.. includecode:: ../../akka-samples/akka-sample-remote/src/main/java/sample/remote/calculator/java/JCreationActor.java
+.. includecode:: ../../../akka-samples/akka-sample-remote/src/main/java/sample/remote/calculator/java/JCreationActor.java
:include: actor
but the setup uses only ``actorOf``:
-.. includecode:: ../../akka-samples/akka-sample-remote/src/main/java/sample/remote/calculator/java/JCreationApplication.java
+.. includecode:: ../../../akka-samples/akka-sample-remote/src/main/java/sample/remote/calculator/java/JCreationApplication.java
:include: setup
Observe how the name of the server actor matches the deployment given in the
diff --git a/akka-docs/java/routing.rst b/akka-docs/rst/java/routing.rst
similarity index 100%
rename from akka-docs/java/routing.rst
rename to akka-docs/rst/java/routing.rst
diff --git a/akka-docs/java/scheduler.rst b/akka-docs/rst/java/scheduler.rst
similarity index 89%
rename from akka-docs/java/scheduler.rst
rename to akka-docs/rst/java/scheduler.rst
index 28da7feeca..96b6934506 100644
--- a/akka-docs/java/scheduler.rst
+++ b/akka-docs/rst/java/scheduler.rst
@@ -37,14 +37,14 @@ Some examples
From ``akka.actor.ActorSystem``
-------------------------------
-.. includecode:: ../../akka-actor/src/main/scala/akka/actor/ActorSystem.scala
+.. includecode:: ../../../akka-actor/src/main/scala/akka/actor/ActorSystem.scala
:include: scheduler
The Scheduler interface
-----------------------
-.. includecode:: ../../akka-actor/src/main/scala/akka/actor/Scheduler.scala
+.. includecode:: ../../../akka-actor/src/main/scala/akka/actor/Scheduler.scala
:include: scheduler
The Cancellable interface
@@ -55,6 +55,6 @@ This allows you to ``cancel`` something that has been scheduled for execution.
.. warning::
This does not abort the execution of the task, if it had already been started.
-.. includecode:: ../../akka-actor/src/main/scala/akka/actor/Scheduler.scala
+.. includecode:: ../../../akka-actor/src/main/scala/akka/actor/Scheduler.scala
:include: cancellable
diff --git a/akka-docs/java/serialization.rst b/akka-docs/rst/java/serialization.rst
similarity index 100%
rename from akka-docs/java/serialization.rst
rename to akka-docs/rst/java/serialization.rst
diff --git a/akka-docs/java/stm.rst b/akka-docs/rst/java/stm.rst
similarity index 100%
rename from akka-docs/java/stm.rst
rename to akka-docs/rst/java/stm.rst
diff --git a/akka-docs/java/testing.rst b/akka-docs/rst/java/testing.rst
similarity index 100%
rename from akka-docs/java/testing.rst
rename to akka-docs/rst/java/testing.rst
diff --git a/akka-docs/java/transactors.rst b/akka-docs/rst/java/transactors.rst
similarity index 100%
rename from akka-docs/java/transactors.rst
rename to akka-docs/rst/java/transactors.rst
diff --git a/akka-docs/java/typed-actors.rst b/akka-docs/rst/java/typed-actors.rst
similarity index 100%
rename from akka-docs/java/typed-actors.rst
rename to akka-docs/rst/java/typed-actors.rst
diff --git a/akka-docs/java/untyped-actors.rst b/akka-docs/rst/java/untyped-actors.rst
similarity index 100%
rename from akka-docs/java/untyped-actors.rst
rename to akka-docs/rst/java/untyped-actors.rst
diff --git a/akka-docs/java/zeromq.rst b/akka-docs/rst/java/zeromq.rst
similarity index 100%
rename from akka-docs/java/zeromq.rst
rename to akka-docs/rst/java/zeromq.rst
diff --git a/akka-docs/modules/camel-async-interact.png b/akka-docs/rst/modules/camel-async-interact.png
similarity index 100%
rename from akka-docs/modules/camel-async-interact.png
rename to akka-docs/rst/modules/camel-async-interact.png
diff --git a/akka-docs/modules/camel-async-sequence.png b/akka-docs/rst/modules/camel-async-sequence.png
similarity index 100%
rename from akka-docs/modules/camel-async-sequence.png
rename to akka-docs/rst/modules/camel-async-sequence.png
diff --git a/akka-docs/modules/camel-custom-route.png b/akka-docs/rst/modules/camel-custom-route.png
similarity index 100%
rename from akka-docs/modules/camel-custom-route.png
rename to akka-docs/rst/modules/camel-custom-route.png
diff --git a/akka-docs/modules/camel-pubsub.png b/akka-docs/rst/modules/camel-pubsub.png
similarity index 100%
rename from akka-docs/modules/camel-pubsub.png
rename to akka-docs/rst/modules/camel-pubsub.png
diff --git a/akka-docs/modules/camel-pubsub2.png b/akka-docs/rst/modules/camel-pubsub2.png
similarity index 100%
rename from akka-docs/modules/camel-pubsub2.png
rename to akka-docs/rst/modules/camel-pubsub2.png
diff --git a/akka-docs/modules/camel.rst b/akka-docs/rst/modules/camel.rst
similarity index 100%
rename from akka-docs/modules/camel.rst
rename to akka-docs/rst/modules/camel.rst
diff --git a/akka-docs/modules/code/docs/actor/mailbox/DurableMailboxDocSpec.scala b/akka-docs/rst/modules/code/docs/actor/mailbox/DurableMailboxDocSpec.scala
similarity index 100%
rename from akka-docs/modules/code/docs/actor/mailbox/DurableMailboxDocSpec.scala
rename to akka-docs/rst/modules/code/docs/actor/mailbox/DurableMailboxDocSpec.scala
diff --git a/akka-docs/modules/code/docs/actor/mailbox/DurableMailboxDocTest.scala b/akka-docs/rst/modules/code/docs/actor/mailbox/DurableMailboxDocTest.scala
similarity index 100%
rename from akka-docs/modules/code/docs/actor/mailbox/DurableMailboxDocTest.scala
rename to akka-docs/rst/modules/code/docs/actor/mailbox/DurableMailboxDocTest.scala
diff --git a/akka-docs/modules/code/docs/actor/mailbox/DurableMailboxDocTestBase.java b/akka-docs/rst/modules/code/docs/actor/mailbox/DurableMailboxDocTestBase.java
similarity index 100%
rename from akka-docs/modules/code/docs/actor/mailbox/DurableMailboxDocTestBase.java
rename to akka-docs/rst/modules/code/docs/actor/mailbox/DurableMailboxDocTestBase.java
diff --git a/akka-docs/modules/durable-mailbox.rst b/akka-docs/rst/modules/durable-mailbox.rst
similarity index 97%
rename from akka-docs/modules/durable-mailbox.rst
rename to akka-docs/rst/modules/durable-mailbox.rst
index 5be40320d0..794ff0e751 100644
--- a/akka-docs/modules/durable-mailbox.rst
+++ b/akka-docs/rst/modules/durable-mailbox.rst
@@ -68,7 +68,7 @@ Corresponding example in Java:
You can also configure and tune the file-based durable mailbox. This is done in
the ``akka.actor.mailbox.file-based`` section in the :ref:`configuration`.
-.. literalinclude:: ../../akka-durable-mailboxes/akka-file-mailbox/src/main/resources/reference.conf
+.. literalinclude:: ../../../akka-durable-mailboxes/akka-file-mailbox/src/main/resources/reference.conf
:language: none
How to implement a durable mailbox
diff --git a/akka-docs/modules/http.rst b/akka-docs/rst/modules/http.rst
similarity index 100%
rename from akka-docs/modules/http.rst
rename to akka-docs/rst/modules/http.rst
diff --git a/akka-docs/modules/index.rst b/akka-docs/rst/modules/index.rst
similarity index 100%
rename from akka-docs/modules/index.rst
rename to akka-docs/rst/modules/index.rst
diff --git a/akka-docs/project/index.rst b/akka-docs/rst/project/index.rst
similarity index 100%
rename from akka-docs/project/index.rst
rename to akka-docs/rst/project/index.rst
diff --git a/akka-docs/project/issue-tracking.rst b/akka-docs/rst/project/issue-tracking.rst
similarity index 100%
rename from akka-docs/project/issue-tracking.rst
rename to akka-docs/rst/project/issue-tracking.rst
diff --git a/akka-docs/project/licenses.rst b/akka-docs/rst/project/licenses.rst
similarity index 100%
rename from akka-docs/project/licenses.rst
rename to akka-docs/rst/project/licenses.rst
diff --git a/akka-docs/project/links.rst b/akka-docs/rst/project/links.rst
similarity index 90%
rename from akka-docs/project/links.rst
rename to akka-docs/rst/project/links.rst
index 3002dc1216..238971d1ba 100644
--- a/akka-docs/project/links.rst
+++ b/akka-docs/rst/project/links.rst
@@ -57,7 +57,7 @@ http://repo.typesafe.com/typesafe/snapshots/ as both ``SNAPSHOT`` and
timestamped versions.
For timestamped versions, pick a timestamp from
-http://repo.typesafe.com/typesafe/snapshots/com/typesafe/akka/akka-actor/.
+http://repo.typesafe.com/typesafe/snapshots/com/typesafe/akka/akka-actor_@binVersion@/.
All Akka modules that belong to the same build have the same timestamp.
Make sure that you add the repository to the sbt resolvers or maven repositories::
@@ -66,6 +66,6 @@ Make sure that you add the repository to the sbt resolvers or maven repositories
Define the library dependencies with the timestamp as version. For example::
- libraryDependencies += "com.typesafe.akka" % "akka-actor" % "2.0-20111215-000549"
+ libraryDependencies += "com.typesafe.akka" % "akka-actor_@binVersion@" % "2.1-20120913-000917"
- libraryDependencies += "com.typesafe.akka" % "akka-remote" % "2.0-20111215-000549"
+ libraryDependencies += "com.typesafe.akka" % "akka-remote_@binVersion@" % "2.1-20120913-000917"
diff --git a/akka-docs/project/migration-guide-1.3.x-2.0.x.rst b/akka-docs/rst/project/migration-guide-1.3.x-2.0.x.rst
similarity index 100%
rename from akka-docs/project/migration-guide-1.3.x-2.0.x.rst
rename to akka-docs/rst/project/migration-guide-1.3.x-2.0.x.rst
diff --git a/akka-docs/project/migration-guide-2.0.x-2.1.x.rst b/akka-docs/rst/project/migration-guide-2.0.x-2.1.x.rst
similarity index 99%
rename from akka-docs/project/migration-guide-2.0.x-2.1.x.rst
rename to akka-docs/rst/project/migration-guide-2.0.x-2.1.x.rst
index ec04dacdda..f5fa272ed2 100644
--- a/akka-docs/project/migration-guide-2.0.x-2.1.x.rst
+++ b/akka-docs/rst/project/migration-guide-2.0.x-2.1.x.rst
@@ -15,11 +15,7 @@ migrating `1.3.x to 2.0.x
+ */
+package docs.routing
+
+import akka.actor.{ Actor, Props, ActorSystem }
+import com.typesafe.config.ConfigFactory
+import akka.routing.FromConfig
+
+case class Message(nbr: Int)
+
+class ExampleActor extends Actor {
+ def receive = {
+ case Message(nbr) ⇒ println("Received %s in router %s".format(nbr, self.path.name))
+ }
+}
+
+object RouterWithConfigExample extends App {
+ val config = ConfigFactory.parseString("""
+ //#config
+ akka.actor.deployment {
+ /router {
+ router = round-robin
+ nr-of-instances = 5
+ }
+ }
+ //#config
+ //#config-resize
+ akka.actor.deployment {
+ /router2 {
+ router = round-robin
+ resizer {
+ lower-bound = 2
+ upper-bound = 15
+ }
+ }
+ }
+ //#config-resize
+ """)
+ val system = ActorSystem("Example", config)
+ //#configurableRouting
+ val router = system.actorOf(Props[ExampleActor].withRouter(FromConfig()),
+ "router")
+ //#configurableRouting
+ 1 to 10 foreach { i ⇒ router ! Message(i) }
+
+ //#configurableRoutingWithResizer
+ val router2 = system.actorOf(Props[ExampleActor].withRouter(FromConfig()),
+ "router2")
+ //#configurableRoutingWithResizer
+ 1 to 10 foreach { i ⇒ router2 ! Message(i) }
+}
\ No newline at end of file
diff --git a/akka-docs/scala/code/docs/routing/RouterViaProgramExample.scala b/akka-docs/rst/scala/code/docs/routing/RouterViaProgramExample.scala
similarity index 100%
rename from akka-docs/scala/code/docs/routing/RouterViaProgramExample.scala
rename to akka-docs/rst/scala/code/docs/routing/RouterViaProgramExample.scala
diff --git a/akka-docs/scala/code/docs/serialization/SerializationDocSpec.scala b/akka-docs/rst/scala/code/docs/serialization/SerializationDocSpec.scala
similarity index 100%
rename from akka-docs/scala/code/docs/serialization/SerializationDocSpec.scala
rename to akka-docs/rst/scala/code/docs/serialization/SerializationDocSpec.scala
diff --git a/akka-docs/scala/code/docs/testkit/PlainWordSpec.scala b/akka-docs/rst/scala/code/docs/testkit/PlainWordSpec.scala
similarity index 100%
rename from akka-docs/scala/code/docs/testkit/PlainWordSpec.scala
rename to akka-docs/rst/scala/code/docs/testkit/PlainWordSpec.scala
diff --git a/akka-docs/scala/code/docs/testkit/TestKitUsageSpec.scala b/akka-docs/rst/scala/code/docs/testkit/TestKitUsageSpec.scala
similarity index 100%
rename from akka-docs/scala/code/docs/testkit/TestKitUsageSpec.scala
rename to akka-docs/rst/scala/code/docs/testkit/TestKitUsageSpec.scala
diff --git a/akka-docs/scala/code/docs/testkit/TestkitDocSpec.scala b/akka-docs/rst/scala/code/docs/testkit/TestkitDocSpec.scala
similarity index 100%
rename from akka-docs/scala/code/docs/testkit/TestkitDocSpec.scala
rename to akka-docs/rst/scala/code/docs/testkit/TestkitDocSpec.scala
diff --git a/akka-docs/scala/code/docs/transactor/TransactorDocSpec.scala b/akka-docs/rst/scala/code/docs/transactor/TransactorDocSpec.scala
similarity index 100%
rename from akka-docs/scala/code/docs/transactor/TransactorDocSpec.scala
rename to akka-docs/rst/scala/code/docs/transactor/TransactorDocSpec.scala
diff --git a/akka-docs/scala/code/docs/zeromq/ZeromqDocSpec.scala b/akka-docs/rst/scala/code/docs/zeromq/ZeromqDocSpec.scala
similarity index 100%
rename from akka-docs/scala/code/docs/zeromq/ZeromqDocSpec.scala
rename to akka-docs/rst/scala/code/docs/zeromq/ZeromqDocSpec.scala
diff --git a/akka-docs/scala/dataflow.rst b/akka-docs/rst/scala/dataflow.rst
similarity index 97%
rename from akka-docs/scala/dataflow.rst
rename to akka-docs/rst/scala/dataflow.rst
index 804cb7d196..c6185257c2 100644
--- a/akka-docs/scala/dataflow.rst
+++ b/akka-docs/rst/scala/dataflow.rst
@@ -25,7 +25,7 @@ Scala's Delimited Continuations plugin is required to use the Dataflow API. To e
autoCompilerPlugins := true,
libraryDependencies <+= scalaVersion {
- v => compilerPlugin("org.scala-lang.plugins" % "continuations" % )
+ v => compilerPlugin("org.scala-lang.plugins" % "continuations" % @scalaVersion@)
},
scalacOptions += "-P:continuations:enable",
@@ -34,7 +34,7 @@ You will also need to include a dependency on ``akka-dataflow``:
.. code-block:: scala
- "com.typesafe.akka" %% "akka-dataflow" % "2.1-SNAPSHOT" cross CrossVersion.full
+ "com.typesafe.akka" %% "akka-dataflow" % "@version@" @crossString@
Dataflow variables
------------------
@@ -108,3 +108,4 @@ Conclusions:
- Dataflow has a smaller code footprint and arguably is easier to reason about.
- For-comprehensions are more general than Dataflow, and can operate on a wide array of types.
+
diff --git a/akka-docs/scala/dispatchers.rst b/akka-docs/rst/scala/dispatchers.rst
similarity index 100%
rename from akka-docs/scala/dispatchers.rst
rename to akka-docs/rst/scala/dispatchers.rst
diff --git a/akka-docs/scala/event-bus.rst b/akka-docs/rst/scala/event-bus.rst
similarity index 100%
rename from akka-docs/scala/event-bus.rst
rename to akka-docs/rst/scala/event-bus.rst
diff --git a/akka-docs/scala/extending-akka.rst b/akka-docs/rst/scala/extending-akka.rst
similarity index 100%
rename from akka-docs/scala/extending-akka.rst
rename to akka-docs/rst/scala/extending-akka.rst
diff --git a/akka-docs/scala/fault-tolerance-sample.rst b/akka-docs/rst/scala/fault-tolerance-sample.rst
similarity index 100%
rename from akka-docs/scala/fault-tolerance-sample.rst
rename to akka-docs/rst/scala/fault-tolerance-sample.rst
diff --git a/akka-docs/scala/fault-tolerance.rst b/akka-docs/rst/scala/fault-tolerance.rst
similarity index 100%
rename from akka-docs/scala/fault-tolerance.rst
rename to akka-docs/rst/scala/fault-tolerance.rst
diff --git a/akka-docs/scala/fsm.rst b/akka-docs/rst/scala/fsm.rst
similarity index 100%
rename from akka-docs/scala/fsm.rst
rename to akka-docs/rst/scala/fsm.rst
diff --git a/akka-docs/scala/futures.rst b/akka-docs/rst/scala/futures.rst
similarity index 100%
rename from akka-docs/scala/futures.rst
rename to akka-docs/rst/scala/futures.rst
diff --git a/akka-docs/scala/howto.rst b/akka-docs/rst/scala/howto.rst
similarity index 79%
rename from akka-docs/scala/howto.rst
rename to akka-docs/rst/scala/howto.rst
index bcaa456b82..7d064e2491 100644
--- a/akka-docs/scala/howto.rst
+++ b/akka-docs/rst/scala/howto.rst
@@ -21,7 +21,7 @@ Contributed by: Kaspar Fischer
"A message throttler that ensures that messages are not sent out at too high a rate."
-The pattern is described `here `_.
+The pattern is described in `Throttling Messages in Akka 2 `_.
Balancing Workload Across Nodes
===============================
@@ -32,7 +32,7 @@ Contributed by: Derek Wyatt
stipulation that the Actors doing the work have distinct Mailboxes on remote
nodes. In this post we’ll explore the implementation of such a concept."
-The pattern is described `here `_.
+The pattern is described `Balancing Workload across Nodes with Akka 2 `_.
Ordered Termination
===================
@@ -46,7 +46,7 @@ If an Actor has children that have order dependencies, then you might need to en
a particular shutdown order of those children so that their postStop() methods get
called in the right order."
-The pattern is described `here `_.
+The pattern is described `An Akka 2 Terminator `_.
Akka AMQP Proxies
=================
@@ -57,7 +57,7 @@ Contributed by: Fabrice Drouin
You still write “local” code, have very little to configure, and end up with a distributed, elastic,
fault-tolerant grid where computing nodes can be written in nearly every programming language."
-The pattern is described `here `_.
+The pattern is described `Akka AMQP Proxies `_.
Shutdown Patterns in Akka 2
===========================
@@ -72,7 +72,7 @@ She’s just plain mean.
In this post, we’ll discuss why this is the case and provide you with a simple option for shutting down “at the right time”,
as well as a not-so-simple-option for doing the exact same thing."
-The pattern is described `here `_.
+The pattern is described `Shutdown Patterns in Akka 2 `_.
Distributed (in-memory) graph processing with Akka
==================================================
@@ -83,7 +83,7 @@ Contributed by: Adelbert Chang
and have become even more interesting in the context of online social networks such as Facebook and Twitter,
whose underlying network structures are nicely represented by graphs."
-The pattern is described `here `_.
+The pattern is described `Distributed In-Memory Graph Processing with Akka `_.
Case Study: An Auto-Updating Cache Using Actors
===============================================
@@ -96,7 +96,7 @@ The data in the backend system is constantly being updated so the caches need to
Requests to the backend system need to be throttled.
The caching system we built used Akka actors and Scala’s support for functions as first class objects."
-The pattern is described `here `_.
+The pattern is described `Case Study: An Auto-Updating Cache using Actors `_.
Discovering message flows in actor systems with the Spider Pattern
==================================================================
@@ -109,7 +109,7 @@ on several machines to find out what’s going on. I’m sure you have browsed t
This is where the Spider pattern comes in."
-The pattern is described `here `_.
+The pattern is described `Discovering Message Flows in Actor System with the Spider Pattern `_.
Template Pattern
================
diff --git a/akka-docs/scala/index.rst b/akka-docs/rst/scala/index.rst
similarity index 100%
rename from akka-docs/scala/index.rst
rename to akka-docs/rst/scala/index.rst
diff --git a/akka-docs/scala/io.rst b/akka-docs/rst/scala/io.rst
similarity index 100%
rename from akka-docs/scala/io.rst
rename to akka-docs/rst/scala/io.rst
diff --git a/akka-docs/scala/logging.rst b/akka-docs/rst/scala/logging.rst
similarity index 100%
rename from akka-docs/scala/logging.rst
rename to akka-docs/rst/scala/logging.rst
diff --git a/akka-docs/scala/microkernel.rst b/akka-docs/rst/scala/microkernel.rst
similarity index 90%
rename from akka-docs/scala/microkernel.rst
rename to akka-docs/rst/scala/microkernel.rst
index c2bc95cb8b..c223f9dd45 100644
--- a/akka-docs/scala/microkernel.rst
+++ b/akka-docs/rst/scala/microkernel.rst
@@ -36,7 +36,7 @@ On a Windows machine you can also use the bin/akka.bat script.
The code for the Hello Kernel example (see the ``HelloKernel`` class for an example
of creating a Bootable):
-.. includecode:: ../../akka-samples/akka-sample-hello-kernel/src/main/scala/sample/kernel/hello/HelloKernel.scala
+.. includecode:: ../../../akka-samples/akka-sample-hello-kernel/src/main/scala/sample/kernel/hello/HelloKernel.scala
Distribution of microkernel application
@@ -48,12 +48,12 @@ start scripts.
To use the sbt plugin you define it in your ``project/plugins.sbt``:
-.. includecode:: ../../akka-sbt-plugin/sample/project/plugins.sbt
+.. includecode:: ../../../akka-sbt-plugin/sample/project/plugins.sbt
Then you add it to the settings of your ``project/Build.scala``. It is also important that you add the ``akka-kernel`` dependency.
This is an example of a complete sbt build file:
-.. includecode:: ../../akka-sbt-plugin/sample/project/Build.scala
+.. includecode:: ../../../akka-sbt-plugin/sample/project/Build.scala
Run the plugin with sbt::
diff --git a/akka-docs/scala/remoting.rst b/akka-docs/rst/scala/remoting.rst
similarity index 90%
rename from akka-docs/scala/remoting.rst
rename to akka-docs/rst/scala/remoting.rst
index d482b21b04..2077a8fd61 100644
--- a/akka-docs/scala/remoting.rst
+++ b/akka-docs/rst/scala/remoting.rst
@@ -12,7 +12,7 @@ Preparing your ActorSystem for Remoting
The Akka remoting is a separate jar file. Make sure that you have the following dependency in your project::
- "com.typesafe.akka" % "akka-remote" % "2.1-SNAPSHOT"
+ "com.typesafe.akka" %% "akka-remote" % "@version@" @crossString@
To enable remote capabilities in your Akka project you should, at a minimum, add the following changes
to your ``application.conf`` file::
@@ -54,7 +54,7 @@ The example above only illustrates the bare minimum of properties you have to ad
There are lots of more properties that are related to remoting in Akka. We refer to the following
reference file for more information:
-.. literalinclude:: ../../akka-remote/src/main/resources/reference.conf
+.. literalinclude:: ../../../akka-remote/src/main/resources/reference.conf
:language: none
Types of Remote Interaction
@@ -198,7 +198,7 @@ This sample demonstrates both, remote deployment and look-up of remote actors.
First, let us have a look at the common setup for both scenarios (this is
``common.conf``):
-.. includecode:: ../../akka-samples/akka-sample-remote/src/main/resources/common.conf
+.. includecode:: ../../../akka-samples/akka-sample-remote/src/main/resources/common.conf
This enables the remoting by installing the :class:`RemoteActorRefProvider` and
chooses the default remote transport. All other options will be set
@@ -218,39 +218,39 @@ In order to look up a remote actor, that one must be created first. For this
purpose, we configure an actor system to listen on port 2552 (this is a snippet
from ``application.conf``):
-.. includecode:: ../../akka-samples/akka-sample-remote/src/main/resources/application.conf
+.. includecode:: ../../../akka-samples/akka-sample-remote/src/main/resources/application.conf
:include: calculator
Then the actor must be created. For all code which follows, assume these imports:
-.. includecode:: ../../akka-samples/akka-sample-remote/src/main/scala/sample/remote/calculator/LookupApplication.scala
+.. includecode:: ../../../akka-samples/akka-sample-remote/src/main/scala/sample/remote/calculator/LookupApplication.scala
:include: imports
The actor doing the work will be this one:
-.. includecode:: ../../akka-samples/akka-sample-remote/src/main/scala/sample/remote/calculator/CalculatorApplication.scala
+.. includecode:: ../../../akka-samples/akka-sample-remote/src/main/scala/sample/remote/calculator/CalculatorApplication.scala
:include: actor
and we start it within an actor system using the above configuration
-.. includecode:: ../../akka-samples/akka-sample-remote/src/main/scala/sample/remote/calculator/CalculatorApplication.scala
+.. includecode:: ../../../akka-samples/akka-sample-remote/src/main/scala/sample/remote/calculator/CalculatorApplication.scala
:include: setup
With the service actor up and running, we may look it up from another actor
system, which will be configured to use port 2553 (this is a snippet from
``application.conf``).
-.. includecode:: ../../akka-samples/akka-sample-remote/src/main/resources/application.conf
+.. includecode:: ../../../akka-samples/akka-sample-remote/src/main/resources/application.conf
:include: remotelookup
The actor which will query the calculator is a quite simple one for demonstration purposes
-.. includecode:: ../../akka-samples/akka-sample-remote/src/main/scala/sample/remote/calculator/LookupApplication.scala
+.. includecode:: ../../../akka-samples/akka-sample-remote/src/main/scala/sample/remote/calculator/LookupApplication.scala
:include: actor
and it is created from an actor system using the aforementioned client’s config.
-.. includecode:: ../../akka-samples/akka-sample-remote/src/main/scala/sample/remote/calculator/LookupApplication.scala
+.. includecode:: ../../../akka-samples/akka-sample-remote/src/main/scala/sample/remote/calculator/LookupApplication.scala
:include: setup
Requests which come in via ``doSomething`` will be sent to the client actor
@@ -266,22 +266,22 @@ Creating remote actors instead of looking them up is not visible in the source
code, only in the configuration file. This section is used in this scenario
(this is a snippet from ``application.conf``):
-.. includecode:: ../../akka-samples/akka-sample-remote/src/main/resources/application.conf
+.. includecode:: ../../../akka-samples/akka-sample-remote/src/main/resources/application.conf
:include: remotecreation
For all code which follows, assume these imports:
-.. includecode:: ../../akka-samples/akka-sample-remote/src/main/scala/sample/remote/calculator/LookupApplication.scala
+.. includecode:: ../../../akka-samples/akka-sample-remote/src/main/scala/sample/remote/calculator/LookupApplication.scala
:include: imports
The client actor looks like in the previous example
-.. includecode:: ../../akka-samples/akka-sample-remote/src/main/scala/sample/remote/calculator/CreationApplication.scala
+.. includecode:: ../../../akka-samples/akka-sample-remote/src/main/scala/sample/remote/calculator/CreationApplication.scala
:include: actor
but the setup uses only ``actorOf``:
-.. includecode:: ../../akka-samples/akka-sample-remote/src/main/scala/sample/remote/calculator/CreationApplication.scala
+.. includecode:: ../../../akka-samples/akka-sample-remote/src/main/scala/sample/remote/calculator/CreationApplication.scala
:include: setup
Observe how the name of the server actor matches the deployment given in the
diff --git a/akka-docs/scala/routing.rst b/akka-docs/rst/scala/routing.rst
similarity index 97%
rename from akka-docs/scala/routing.rst
rename to akka-docs/rst/scala/routing.rst
index c1fa21b23f..9dc356c98c 100644
--- a/akka-docs/scala/routing.rst
+++ b/akka-docs/rst/scala/routing.rst
@@ -126,7 +126,7 @@ not have an effect on the number of actors in the pool.
Setting the strategy is easily done:
-.. includecode:: ../../akka-actor-tests/src/test/scala/akka/routing/RoutingSpec.scala#supervision
+.. includecode:: ../../../akka-actor-tests/src/test/scala/akka/routing/RoutingSpec.scala#supervision
:include: supervision
:exclude: custom-strategy
@@ -378,12 +378,12 @@ democrat related messages to the Democrat actor and all republican related messa
We begin with defining the class:
-.. includecode:: ../../akka-actor-tests/src/test/scala/akka/routing/RoutingSpec.scala#crRouter
+.. includecode:: ../../../akka-actor-tests/src/test/scala/akka/routing/RoutingSpec.scala#crRouter
:exclude: crRoute
The next step is to implement the ``createRoute`` method in the class just defined:
-.. includecode:: ../../akka-actor-tests/src/test/scala/akka/routing/RoutingSpec.scala#crRoute
+.. includecode:: ../../../akka-actor-tests/src/test/scala/akka/routing/RoutingSpec.scala#crRoute
As you can see above we start off by creating the routees and put them in a collection.
@@ -392,12 +392,12 @@ It registers the routees internally and failing to call this method will
cause a ``ActorInitializationException`` to be thrown when the router is used.
Therefore always make sure to do the following in your custom router:
-.. includecode:: ../../akka-actor-tests/src/test/scala/akka/routing/RoutingSpec.scala#crRegisterRoutees
+.. includecode:: ../../../akka-actor-tests/src/test/scala/akka/routing/RoutingSpec.scala#crRegisterRoutees
The routing logic is where your magic sauce is applied. In our example it inspects the message types
and forwards to the correct routee based on this:
-.. includecode:: ../../akka-actor-tests/src/test/scala/akka/routing/RoutingSpec.scala#crRoutingLogic
+.. includecode:: ../../../akka-actor-tests/src/test/scala/akka/routing/RoutingSpec.scala#crRoutingLogic
As you can see above what's returned in the partial function is a ``List`` of ``Destination(sender, routee)``.
The sender is what "parent" the routee should see - changing this could be useful if you for example want
@@ -407,7 +407,7 @@ For more information about how to alter the original sender we refer to the sour
All in all the custom router looks like this:
-.. includecode:: ../../akka-actor-tests/src/test/scala/akka/routing/RoutingSpec.scala#CustomRouter
+.. includecode:: ../../../akka-actor-tests/src/test/scala/akka/routing/RoutingSpec.scala#CustomRouter
If you are interested in how to use the VoteCountRouter you can have a look at the test class
`RoutingSpec `_
diff --git a/akka-docs/scala/scheduler.rst b/akka-docs/rst/scala/scheduler.rst
similarity index 89%
rename from akka-docs/scala/scheduler.rst
rename to akka-docs/rst/scala/scheduler.rst
index 0a5b8aed51..e221752fac 100644
--- a/akka-docs/scala/scheduler.rst
+++ b/akka-docs/rst/scala/scheduler.rst
@@ -37,14 +37,14 @@ Some examples
From ``akka.actor.ActorSystem``
-------------------------------
-.. includecode:: ../../akka-actor/src/main/scala/akka/actor/ActorSystem.scala
+.. includecode:: ../../../akka-actor/src/main/scala/akka/actor/ActorSystem.scala
:include: scheduler
The Scheduler interface
-----------------------
-.. includecode:: ../../akka-actor/src/main/scala/akka/actor/Scheduler.scala
+.. includecode:: ../../../akka-actor/src/main/scala/akka/actor/Scheduler.scala
:include: scheduler
The Cancellable interface
@@ -55,6 +55,6 @@ This allows you to ``cancel`` something that has been scheduled for execution.
.. warning::
This does not abort the execution of the task, if it had already been started.
-.. includecode:: ../../akka-actor/src/main/scala/akka/actor/Scheduler.scala
+.. includecode:: ../../../akka-actor/src/main/scala/akka/actor/Scheduler.scala
:include: cancellable
diff --git a/akka-docs/scala/serialization.rst b/akka-docs/rst/scala/serialization.rst
similarity index 100%
rename from akka-docs/scala/serialization.rst
rename to akka-docs/rst/scala/serialization.rst
diff --git a/akka-docs/scala/stm.rst b/akka-docs/rst/scala/stm.rst
similarity index 100%
rename from akka-docs/scala/stm.rst
rename to akka-docs/rst/scala/stm.rst
diff --git a/akka-docs/scala/testing.rst b/akka-docs/rst/scala/testing.rst
similarity index 99%
rename from akka-docs/scala/testing.rst
rename to akka-docs/rst/scala/testing.rst
index 1c7daa26f8..fadf39a2d8 100644
--- a/akka-docs/scala/testing.rst
+++ b/akka-docs/rst/scala/testing.rst
@@ -473,7 +473,7 @@ keep a test running and verify traces later you can also install an
This code can be used to forward messages, e.g. in a chain ``A --> Probe -->
B``, as long as a certain protocol is obeyed.
-.. includecode:: ../../akka-testkit/src/test/scala/akka/testkit/TestProbeSpec.scala#autopilot
+.. includecode:: ../../../akka-testkit/src/test/scala/akka/testkit/TestProbeSpec.scala#autopilot
The :meth:`run` method must return the auto-pilot for the next message, which
may be :class:`KeepRunning` to retain the current one or :class:`NoAutoPilot`
@@ -722,11 +722,11 @@ Testing Custom Router Logic
Given the following custom (dummy) router:
-.. includecode:: ../../akka-actor-tests/src/test/scala/akka/routing/CustomRouteSpec.scala#custom-router
+.. includecode:: ../../../akka-actor-tests/src/test/scala/akka/routing/CustomRouteSpec.scala#custom-router
This might be tested by dispatching messages and asserting their reception at
the right destinations, but that can be inconvenient. Therefore exists the
:obj:`ExtractRoute` extractor, which can be used like so:
-.. includecode:: ../../akka-actor-tests/src/test/scala/akka/routing/CustomRouteSpec.scala#test-route
+.. includecode:: ../../../akka-actor-tests/src/test/scala/akka/routing/CustomRouteSpec.scala#test-route
diff --git a/akka-docs/scala/testkit-example.rst b/akka-docs/rst/scala/testkit-example.rst
similarity index 100%
rename from akka-docs/scala/testkit-example.rst
rename to akka-docs/rst/scala/testkit-example.rst
diff --git a/akka-docs/scala/transactors.rst b/akka-docs/rst/scala/transactors.rst
similarity index 100%
rename from akka-docs/scala/transactors.rst
rename to akka-docs/rst/scala/transactors.rst
diff --git a/akka-docs/scala/typed-actors.rst b/akka-docs/rst/scala/typed-actors.rst
similarity index 100%
rename from akka-docs/scala/typed-actors.rst
rename to akka-docs/rst/scala/typed-actors.rst
diff --git a/akka-docs/scala/zeromq.rst b/akka-docs/rst/scala/zeromq.rst
similarity index 100%
rename from akka-docs/scala/zeromq.rst
rename to akka-docs/rst/scala/zeromq.rst
diff --git a/akka-remote/src/main/scala/akka/remote/RemoteTransport.scala b/akka-remote/src/main/scala/akka/remote/RemoteTransport.scala
index 3aa3818de7..bfbb8529be 100644
--- a/akka-remote/src/main/scala/akka/remote/RemoteTransport.scala
+++ b/akka-remote/src/main/scala/akka/remote/RemoteTransport.scala
@@ -24,6 +24,7 @@ sealed trait RemoteLifeCycleEvent extends Serializable {
*/
trait RemoteClientLifeCycleEvent extends RemoteLifeCycleEvent {
def remoteAddress: Address
+ final def getRemoteAddress: Address = remoteAddress
}
/**
@@ -31,8 +32,8 @@ trait RemoteClientLifeCycleEvent extends RemoteLifeCycleEvent {
*/
case class RemoteClientError(
@BeanProperty cause: Throwable,
- @transient @BeanProperty remote: RemoteTransport,
- @BeanProperty remoteAddress: Address) extends RemoteClientLifeCycleEvent {
+ @transient remote: RemoteTransport,
+ remoteAddress: Address) extends RemoteClientLifeCycleEvent {
override def logLevel: Logging.LogLevel = Logging.ErrorLevel
override def toString: String = "RemoteClientError@" + remoteAddress + ": Error[" + Logging.stackTraceFor(cause) + "]"
}
@@ -42,7 +43,7 @@ case class RemoteClientError(
*/
case class RemoteClientDisconnected(
@transient @BeanProperty remote: RemoteTransport,
- @BeanProperty remoteAddress: Address) extends RemoteClientLifeCycleEvent {
+ remoteAddress: Address) extends RemoteClientLifeCycleEvent {
override def logLevel: Logging.LogLevel = Logging.DebugLevel
override def toString: String = "RemoteClientDisconnected@" + remoteAddress
}
@@ -52,7 +53,7 @@ case class RemoteClientDisconnected(
*/
case class RemoteClientConnected(
@transient @BeanProperty remote: RemoteTransport,
- @BeanProperty remoteAddress: Address) extends RemoteClientLifeCycleEvent {
+ remoteAddress: Address) extends RemoteClientLifeCycleEvent {
override def logLevel: Logging.LogLevel = Logging.DebugLevel
override def toString: String = "RemoteClientConnected@" + remoteAddress
}
@@ -62,7 +63,7 @@ case class RemoteClientConnected(
*/
case class RemoteClientStarted(
@transient @BeanProperty remote: RemoteTransport,
- @BeanProperty remoteAddress: Address) extends RemoteClientLifeCycleEvent {
+ remoteAddress: Address) extends RemoteClientLifeCycleEvent {
override def logLevel: Logging.LogLevel = Logging.InfoLevel
override def toString: String = "RemoteClientStarted@" + remoteAddress
}
@@ -72,7 +73,7 @@ case class RemoteClientStarted(
*/
case class RemoteClientShutdown(
@transient @BeanProperty remote: RemoteTransport,
- @BeanProperty remoteAddress: Address) extends RemoteClientLifeCycleEvent {
+ remoteAddress: Address) extends RemoteClientLifeCycleEvent {
override def logLevel: Logging.LogLevel = Logging.InfoLevel
override def toString: String = "RemoteClientShutdown@" + remoteAddress
}
diff --git a/akka-zeromq/src/test/scala/akka/zeromq/ConcurrentSocketActorSpec.scala b/akka-zeromq/src/test/scala/akka/zeromq/ConcurrentSocketActorSpec.scala
index d5d9370a2f..3226b874a1 100644
--- a/akka-zeromq/src/test/scala/akka/zeromq/ConcurrentSocketActorSpec.scala
+++ b/akka-zeromq/src/test/scala/akka/zeromq/ConcurrentSocketActorSpec.scala
@@ -18,8 +18,8 @@ class ConcurrentSocketActorSpec extends AkkaSpec {
def checkZeroMQInstallation =
try {
zmq.version match {
- case ZeroMQVersion(2, 1, _) ⇒ Unit
- case version ⇒ invalidZeroMQVersion(version)
+ case ZeroMQVersion(x, y, _) if x >= 3 || (x >= 2 && y >= 1) ⇒ Unit
+ case version ⇒ invalidZeroMQVersion(version)
}
} catch {
case e: LinkageError ⇒ zeroMQNotInstalled
diff --git a/project/AkkaBuild.scala b/project/AkkaBuild.scala
index e818a52613..f54d39627e 100644
--- a/project/AkkaBuild.scala
+++ b/project/AkkaBuild.scala
@@ -15,7 +15,7 @@ import com.typesafe.tools.mima.plugin.MimaPlugin.mimaDefaultSettings
import com.typesafe.tools.mima.plugin.MimaKeys.previousArtifact
import java.lang.Boolean.getBoolean
import sbt.Tests
-import Sphinx.{ sphinxDocs, sphinxHtml, sphinxLatex, sphinxPdf, sphinxPygments, sphinxTags }
+import Sphinx.{ sphinxDocs, sphinxHtml, sphinxLatex, sphinxPdf, sphinxPygments, sphinxTags, sphinxVars, sphinxExts }
object AkkaBuild extends Build {
System.setProperty("akka.mode", "test") // Is there better place for this?
@@ -31,7 +31,7 @@ object AkkaBuild extends Build {
id = "akka",
base = file("."),
settings = parentSettings ++ Release.settings ++ Unidoc.settings ++ Sphinx.settings ++ Publish.versionSettings ++
- Dist.settings ++ mimaSettings ++ Seq(
+ Dist.settings ++ mimaSettings ++ sphinxReplacements ++ Seq(
testMailbox in GlobalScope := System.getProperty("akka.testMailbox", "false").toBoolean,
parallelExecution in GlobalScope := System.getProperty("akka.parallelExecution", "false").toBoolean,
Publish.defaultPublishTo in ThisBuild <<= crossTarget / "repository",
@@ -63,8 +63,9 @@ object AkkaBuild extends Build {
* line (without it, the pygments task would run twice in parallel for
* the same directory, wreaking the expected amount of havoc).
*/
- sphinxDocs <<= baseDirectory / "akka-docs",
+ sphinxDocs <<= baseDirectory / "akka-docs/rst",
sphinxTags in sphinxHtml += "online",
+ sphinxHtml <<= (sphinxHtml, sphinxHtml in LocalProject(docs.id)) map ((orig, dummy) => orig), // make akka-docs run first
sphinxPygments <<= sphinxPygments in LocalProject(docs.id) map identity,
sphinxLatex <<= sphinxLatex in LocalProject(docs.id) map identity,
sphinxPdf <<= sphinxPdf in LocalProject(docs.id) map identity
@@ -348,7 +349,7 @@ object AkkaBuild extends Build {
base = file("akka-docs"),
dependencies = Seq(actor, testkit % "test->test", mailboxesCommon % "compile;test->test",
remote, cluster, slf4j, agent, dataflow, transactor, fileMailbox, zeroMQ, camel, osgi, osgiAries),
- settings = defaultSettings ++ Sphinx.settings ++ Seq(
+ settings = defaultSettings ++ Sphinx.settings ++ sphinxReplacements ++ Seq(
unmanagedSourceDirectories in Test <<= baseDirectory { _ ** "code" get },
libraryDependencies ++= Dependencies.docs,
unmanagedSourceDirectories in ScalariformKeys.format in Test <<= unmanagedSourceDirectories in Test,
@@ -468,6 +469,31 @@ object AkkaBuild extends Build {
testOptions in Test += Tests.Argument("-oDF")
)
+ // customization of sphinx @@ replacements, add to all sphinx-using projects
+ // add additional replacements here
+ lazy val sphinxReplacements = Seq(
+ sphinxVars <<= (scalaVersion, version) { (s, v) =>
+ val BinVer = """(\d+\.\d+)\.\d+""".r
+ Map(
+ "version" -> v,
+ "scalaVersion" -> s,
+ "crossString" -> (s match {
+ case BinVer(_) => ""
+ case _ => "cross CrossVersion.full"
+ }),
+ "jarName" -> (s match {
+ case BinVer(bv) => "akka-actor_" + bv + "-" + v + ".jar"
+ case _ => "akka-actor_" + s + "-" + v + ".jar"
+ }),
+ "binVersion" -> (s match {
+ case BinVer(bv) => bv
+ case _ => s
+ })
+ )
+ },
+ sphinxExts += "py" // needed for transforming conf.py
+ )
+
lazy val formatSettings = ScalariformPlugin.scalariformSettings ++ Seq(
ScalariformKeys.preferences in Compile := formattingPreferences,
ScalariformKeys.preferences in Test := formattingPreferences
diff --git a/project/Sphinx.scala b/project/Sphinx.scala
index b349265b60..2f13710917 100644
--- a/project/Sphinx.scala
+++ b/project/Sphinx.scala
@@ -6,40 +6,36 @@ package akka
import sbt._
import sbt.Keys._
-import java.io.File
+import java.io.{ File, PrintWriter }
object Sphinx {
val sphinxDocs = SettingKey[File]("sphinx-docs")
val sphinxTarget = SettingKey[File]("sphinx-target")
- val sphinxScalaVersion = TaskKey[String]("sphinx-scala-version")
val sphinxPygmentsDir = SettingKey[File]("sphinx-pygments-dir")
val sphinxTags = SettingKey[Seq[String]]("sphinx-tags")
val sphinxPygments = TaskKey[File]("sphinx-pygments", "Sphinx: install pygments styles")
val sphinxHtml = TaskKey[File]("sphinx-html", "Sphinx: HTML documentation.")
val sphinxLatex = TaskKey[File]("sphinx-latex", "Sphinx: Latex documentation.")
val sphinxPdf = TaskKey[File]("sphinx-pdf", "Sphinx: PDF documentation.")
+ val sphinxVars = SettingKey[Map[String, String]]("sphinx-vars", "mappings key->value to be replaced within docs")
+ val sphinxExts = SettingKey[Set[String]]("sphinx-exts", "file extensions which will be filtered for replacements")
val sphinx = TaskKey[File]("sphinx", "Build all Sphinx documentation (HTML and PDF combined).")
lazy val settings = Seq(
- sphinxDocs <<= baseDirectory,
+ sphinxDocs <<= baseDirectory / "rst",
sphinxTarget <<= crossTarget / "sphinx",
- sphinxScalaVersion <<= scalaVersionTask,
- sphinxPygmentsDir <<= sphinxDocs { _ / "_sphinx" / "pygments" },
+ sphinxPygmentsDir <<= sphinxDocs { _ / ".." / "_sphinx" / "pygments" },
sphinxTags in sphinxHtml := Seq.empty,
sphinxTags in sphinxLatex := Seq.empty,
sphinxPygments <<= pygmentsTask,
sphinxHtml <<= buildTask("html", sphinxTags in sphinxHtml),
sphinxLatex <<= buildTask("latex", sphinxTags in sphinxLatex),
sphinxPdf <<= pdfTask,
+ sphinxVars := Map("" -> "@"), // this default makes the @@ -> @ subst work
+ sphinxExts := Set("rst"),
sphinx <<= sphinxTask
)
- def scalaVersionTask = (scalaVersion, streams) map { (v, s) =>
- s.log.info("writing version file")
- IO.write(file("akka-docs/epilog_rst"), ".. |scalaVersion| replace:: " + v + "\n")
- v
- }
-
def pygmentsTask = (sphinxDocs, sphinxPygmentsDir, sphinxTarget, streams) map {
(cwd, pygments, baseTarget, s) => {
val target = baseTarget / "site-packages"
@@ -58,34 +54,63 @@ object Sphinx {
}
target
}
- } dependsOn sphinxScalaVersion
+ }
def buildTask(builder: String, tagsKey: SettingKey[Seq[String]]) = {
- (cacheDirectory, sphinxDocs, sphinxTarget, sphinxPygments, tagsKey, streams) map {
- (cacheDir, docs, baseTarget, pygments, tags, s) => {
+ (cacheDirectory, sphinxDocs, sphinxTarget, sphinxPygments, tagsKey, streams, sphinxVars, sphinxExts) map {
+ (cacheDir, docs, baseTarget, pygments, tags, s, replacements, filterExt) => {
val target = baseTarget / builder
val doctrees = baseTarget / "doctrees" / builder
+ val temp = docs.getParentFile / (docs.getName + "_" + builder)
val cache = cacheDir / "sphinx" / builder
val cached = FileFunction.cached(cache)(FilesInfo.hash, FilesInfo.exists) { (in, out) =>
- val changes = in.modified
- if (!changes.isEmpty) {
- IO.delete(target)
- val tagList = if (tags.isEmpty) "" else tags.mkString(" (", ", ", ")")
- val desc = "%s%s" format (builder, tagList)
- s.log.info("Building Sphinx %s documentation..." format desc)
- changes.foreach(file => s.log.debug("Changed documentation source: " + file))
- val logger = newLogger(s)
- val tagOptions = tags flatMap (Seq("-t", _))
- val command = Seq("sphinx-build", "-aEN", "-b", builder, "-d", doctrees.absolutePath) ++ tagOptions ++ Seq(docs.absolutePath, target.absolutePath)
- val env = "PYTHONPATH" -> pygments.absolutePath
- s.log.debug("Command: " + command.mkString(" "))
- val exitCode = Process(command, docs, env) ! logger
- if (exitCode != 0) sys.error("Failed to build Sphinx %s documentation." format desc)
- s.log.info("Sphinx %s documentation created: %s" format (desc, target))
- target.descendentsExcept("*", "").get.toSet
- } else Set.empty
+ def dst(f: File) = temp / IO.relativize(docs, f).get
+ def filter(f: File) = filterExt contains f.getName.reverse.takeWhile('.' !=).reverse
+ val Replacer = """@(\w+)@""".r
+ /*
+ * First Step: bring filtered source tree in sync with orig source tree
+ */
+ // delete files which were removed
+ in.removed foreach (f => IO delete dst(f))
+ // transform the other files by applying the replacement map for @@ tokens
+ (in.modified ++ (in.checked -- out.checked)).toSeq.sorted foreach { f =>
+ if (f.isFile)
+ if (filter(f)) {
+ s.log.debug("Changed documentation source: " + f)
+ IO.reader(f) { reader =>
+ IO.writer(dst(f), "", IO.defaultCharset, append = false) { writer =>
+ val wr = new PrintWriter(writer)
+ IO.foreachLine(reader) { line =>
+ wr.println(Replacer.replaceAllIn(line, m => replacements.getOrElse(m.group(1), {
+ s.log.warn("unknown replacement " + m.group(1) + " in " + replacements)
+ m.group(0)
+ })))
+ }
+ }
+ }
+ } else {
+ // do not transform PNGs et al
+ s.log.debug("Changed documentation source (copying): " + f)
+ IO.copyFile(f, dst(f))
+ }
+ }
+ /*
+ * Second Step: invoke sphinx-build
+ */
+ val tagList = if (tags.isEmpty) "" else tags.mkString(" (", ", ", ")")
+ val desc = "%s%s" format (builder, tagList)
+ s.log.info("Building Sphinx %s documentation..." format desc)
+ val logger = newLogger(s)
+ val tagOptions = tags flatMap (Seq("-t", _))
+ val command = Seq("sphinx-build", "-aEN", "-b", builder, "-d", doctrees.absolutePath) ++ tagOptions ++ Seq(temp.absolutePath, target.absolutePath)
+ val env = "PYTHONPATH" -> pygments.absolutePath
+ s.log.debug("Command: " + command.mkString(" "))
+ val exitCode = Process(command, docs, env) ! logger
+ if (exitCode != 0) sys.error("Failed to build Sphinx %s documentation." format desc)
+ s.log.info("Sphinx %s documentation created: %s" format (desc, target))
+ temp.descendentsExcept("*", "").get.toSet
}
- val toplevel = docs * ("*" - ".*" - "_sphinx" - "_build" - "disabled" - "target")
+ val toplevel = docs * ("*" - "disabled")
val inputs = toplevel.descendentsExcept("*", "").get.toSet
cached(inputs)
target
@@ -110,8 +135,13 @@ object Sphinx {
def newLogger(streams: TaskStreams) = {
new ProcessLogger {
- def info(o: => String): Unit = streams.log.debug(o)
- def error(e: => String): Unit = streams.log.debug(e)
+ def info(message: => String): Unit = {
+ val m = message
+ if (m contains "ERROR") streams.log.error(message)
+ else if (m contains "WARNING") streams.log.warn(message)
+ else streams.log.debug(message)
+ }
+ def error(e: => String): Unit = streams.log.warn(e)
def buffer[T](f: => T): T = f
}
}