diff --git a/akka-docs/general/supervision.rst b/akka-docs/general/supervision.rst index 75512dd03f..12053ed6ad 100644 --- a/akka-docs/general/supervision.rst +++ b/akka-docs/general/supervision.rst @@ -68,6 +68,8 @@ An actor system will during its creation start at least three actors, shown in the image above. For more information about the consequences for actor paths see :ref:`toplevel-paths`. +.. _user-guardian: + ``/user``: The Guardian Actor ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -89,7 +91,7 @@ will shut down the whole actor system. This special guardian has been introduced in order to achieve an orderly shut-down sequence where logging remains active while all normal actors terminate, even though logging itself is implemented using actors. This is -realized by having the system guardian watch the guardian and initiate its own +realized by having the system guardian watch the user guardian and initiate its own shut-down upon reception of the :class:`Terminated` message. The top-level system actors are supervised using a strategy which will restart indefinitely upon all types of :class:`Exception` except for diff --git a/akka-docs/java/fault-tolerance.rst b/akka-docs/java/fault-tolerance.rst index a444f79ec0..3794ebd3fe 100644 --- a/akka-docs/java/fault-tolerance.rst +++ b/akka-docs/java/fault-tolerance.rst @@ -49,7 +49,7 @@ does not apply, leaving the possibility to specify an absolute upper limit on th restarts or to make the restarts work infinitely. Default Supervisor Strategy ---------------------------- +^^^^^^^^^^^^^^^^^^^^^^^^^^^ ``Escalate`` is used if the defined strategy doesn't cover the exception that was thrown. @@ -64,6 +64,24 @@ exceptions are handled by default: If the exception escalate all the way up to the root guardian it will handle it in the same way as the default strategy defined above. +Stopping Supervisor Strategy +^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Closer to the Erlang way is the strategy to just stop children when they fail +and then take corrective action in the supervisor when DeathWatch signals the +loss of the child. This strategy is also provided pre-packaged as +:obj:`SupervisorStrategy.stoppingStrategy` with an accompanying +:class:`StoppingSupervisorStrategy` configurator to be used when you want the +``"/user"`` guardian to apply it. + +Supervision of Top-Level Actors +------------------------------- + +Toplevel actors means those which are created using ``system.actorOf()``, and +they are children of the :ref:`User Guardian `. There are no +special rules applied in this case, the guardian simply applies the configured +strategy. + Test Application ---------------- diff --git a/akka-docs/java/remoting.rst b/akka-docs/java/remoting.rst index b356381766..d00eb02dc7 100644 --- a/akka-docs/java/remoting.rst +++ b/akka-docs/java/remoting.rst @@ -61,6 +61,10 @@ As you can see from the example above the following pattern is used to find an ` akka://@:/ +Once you obtained a reference to the actor you can interact with it they same way you would with a local actor, e.g.:: + + actor.tell("Pretty awesome feature", getSelf()); + .. note:: For more details on how actor addresses and paths are formed and used, please refer to :ref:`addressing`. diff --git a/akka-docs/scala/fault-tolerance.rst b/akka-docs/scala/fault-tolerance.rst index c1d6158954..f0e3952c99 100644 --- a/akka-docs/scala/fault-tolerance.rst +++ b/akka-docs/scala/fault-tolerance.rst @@ -53,7 +53,7 @@ which is a ``PartialFunction[Throwable, Directive]``. This is the piece which maps child failure types to their corresponding directives. Default Supervisor Strategy ---------------------------- +^^^^^^^^^^^^^^^^^^^^^^^^^^^ ``Escalate`` is used if the defined strategy doesn't cover the exception that was thrown. @@ -68,6 +68,23 @@ exceptions are handled by default: If the exception escalate all the way up to the root guardian it will handle it in the same way as the default strategy defined above. +Stopping Supervisor Strategy +^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Closer to the Erlang way is the strategy to just stop children when they fail +and then take corrective action in the supervisor when DeathWatch signals the +loss of the child. This strategy is also provided pre-packaged as +:obj:`SupervisorStrategy.stoppingStrategy` with an accompanying +:class:`StoppingSupervisorStrategy` configurator to be used when you want the +``"/user"`` guardian to apply it. + +Supervision of Top-Level Actors +------------------------------- + +Toplevel actors means those which are created using ``system.actorOf()``, and +they are children of the :ref:`User Guardian `. There are no +special rules applied in this case, the guardian simply applies the configured +strategy. Test Application ----------------