Skip to content

Commit

Permalink
=doc #3573 Clarify maxNrOfRetries in supervisor strategies
Browse files Browse the repository at this point in the history
  • Loading branch information
patriknw authored and Daniel Hobi committed Jan 23, 2014
1 parent 5b9cc0f commit f920e71
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
6 changes: 4 additions & 2 deletions akka-actor/src/main/scala/akka/actor/FaultHandling.scala
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,8 @@ abstract class SupervisorStrategy {
* to all children when one fails, as opposed to [[akka.actor.OneForOneStrategy]] that applies
* it only to the child actor that failed.
*
* @param maxNrOfRetries the number of times an actor is allowed to be restarted, negative value means no limit
* @param maxNrOfRetries the number of times a child actor is allowed to be restarted, negative value means no limit,
* if the limit is exceeded the child actor is stopped
* @param withinTimeRange duration of the time window for maxNrOfRetries, Duration.Inf means no window
* @param decider mapping from Throwable to [[akka.actor.SupervisorStrategy.Directive]], you can also use a
* [[scala.collection.immutable.Seq]] of Throwables which maps the given Throwables to restarts, otherwise escalates.
Expand Down Expand Up @@ -418,7 +419,8 @@ case class AllForOneStrategy(
* to the child actor that failed, as opposed to [[akka.actor.AllForOneStrategy]] that applies
* it to all children.
*
* @param maxNrOfRetries the number of times an actor is allowed to be restarted, negative value means no limit
* @param maxNrOfRetries the number of times a child actor is allowed to be restarted, negative value means no limit,
* if the limit is exceeded the child actor is stopped
* @param withinTimeRange duration of the time window for maxNrOfRetries, Duration.Inf means no window
* @param decider mapping from Throwable to [[akka.actor.SupervisorStrategy.Directive]], you can also use a
* [[scala.collection.immutable.Seq]] of Throwables which maps the given Throwables to restarts, otherwise escalates.
Expand Down
1 change: 1 addition & 0 deletions akka-docs/rst/java/fault-tolerance.rst
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ failing one). There are limits set on the restart frequency, namely maximum 10
restarts per minute. ``-1`` and ``Duration.Inf()`` means that the respective limit
does not apply, leaving the possibility to specify an absolute upper limit on the
restarts or to make the restarts work infinitely.
The child actor is stopped if the limit is exceeded.

.. note::

Expand Down
1 change: 1 addition & 0 deletions akka-docs/rst/scala/fault-tolerance.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ failing one). There are limits set on the restart frequency, namely maximum 10
restarts per minute; each of these settings could be left out, which means
that the respective limit does not apply, leaving the possibility to specify an
absolute upper limit on the restarts or to make the restarts work infinitely.
The child actor is stopped if the limit is exceeded.

The match statement which forms the bulk of the body is of type ``Decider``,
which is a ``PartialFunction[Throwable, Directive]``. This
Expand Down

0 comments on commit f920e71

Please sign in to comment.