From b05cd61ca2464590c14913afe93b06837779e05d Mon Sep 17 00:00:00 2001 From: Richard Imaoka Date: Wed, 14 Jun 2017 21:27:59 +0900 Subject: [PATCH] Merge java/fault-tolerance-sample.md with scala/fault-tolerance-sample.md (#23160) --- .../paradox/java/fault-tolerance-sample.md | 39 +------------------ .../paradox/scala/fault-tolerance-sample.md | 6 ++- 2 files changed, 6 insertions(+), 39 deletions(-) mode change 100644 => 120000 akka-docs/src/main/paradox/java/fault-tolerance-sample.md diff --git a/akka-docs/src/main/paradox/java/fault-tolerance-sample.md b/akka-docs/src/main/paradox/java/fault-tolerance-sample.md deleted file mode 100644 index ad76d1bcf03..00000000000 --- a/akka-docs/src/main/paradox/java/fault-tolerance-sample.md +++ /dev/null @@ -1,38 +0,0 @@ - - -# Diagrams of the Fault Tolerance Sample - -![faulttolerancesample-normal-flow.png](../images/faulttolerancesample-normal-flow.png) - -*The above diagram illustrates the normal message flow.* - -**Normal flow:** - -|Step | Description | -|--------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -|1 | The progress `Listener` starts the work. | -|2 | The `Worker` schedules work by sending `Do` messages periodically to itself | -|3, 4, 5 | When receiving `Do` the `Worker` tells the `CounterService` to increment the counter, three times. The `Increment` message is forwarded to the `Counter`, which updates its counter variable and sends current value to the `Storage`.| -|6, 7 | The `Worker` asks the `CounterService` of current value of the counter and pipes the result back to the `Listener`. | - -![faulttolerancesample-failure-flow.png](../images/faulttolerancesample-failure-flow.png) - -*The above diagram illustrates what happens in case of storage failure.* - -**Failure flow:** - -|Step | Description | -|-----------|--------------------------------------------------------------------------------------------------------------------------------------------------| -|1 | The `Storage` throws `StorageException`. | -|2 | The `CounterService` is supervisor of the `Storage` and restarts the `Storage` when `StorageException` is thrown. | -|3, 4, 5, 6 | The `Storage` continues to fail and is restarted. | -|7 | After 3 failures and restarts within 5 seconds the `Storage` is stopped by its supervisor, i.e. the `CounterService`. | -|8 | The `CounterService` is also watching the `Storage` for termination and receives the `Terminated` message when the `Storage` has been stopped ...| -|9, 10, 11 | and tells the `Counter` that there is no `Storage`. | -|12 | The `CounterService` schedules a `Reconnect` message to itself. | -|13, 14 | When it receives the `Reconnect` message it creates a new `Storage` ... | -|15, 16 | and tells the `Counter` to use the new `Storage` | - -# Full Source Code of the Fault Tolerance Sample - -@@snip [FaultHandlingDocSample.java]($code$/java/jdocs/actor/FaultHandlingDocSample.java) { #all } \ No newline at end of file diff --git a/akka-docs/src/main/paradox/java/fault-tolerance-sample.md b/akka-docs/src/main/paradox/java/fault-tolerance-sample.md new file mode 120000 index 00000000000..9c3e27aced1 --- /dev/null +++ b/akka-docs/src/main/paradox/java/fault-tolerance-sample.md @@ -0,0 +1 @@ +../scala/fault-tolerance-sample.md \ No newline at end of file diff --git a/akka-docs/src/main/paradox/scala/fault-tolerance-sample.md b/akka-docs/src/main/paradox/scala/fault-tolerance-sample.md index 3f478cc34ae..fdf7e879593 100644 --- a/akka-docs/src/main/paradox/scala/fault-tolerance-sample.md +++ b/akka-docs/src/main/paradox/scala/fault-tolerance-sample.md @@ -35,4 +35,8 @@ # Full Source Code of the Fault Tolerance Sample -@@snip [FaultHandlingDocSample.scala]($code$/scala/docs/actor/FaultHandlingDocSample.scala) { #all } \ No newline at end of file +Scala +: @@snip [FaultHandlingDocSample.scala]($code$/scala/docs/actor/FaultHandlingDocSample.scala) { #all } + +Java +: @@snip [FaultHandlingDocSample.java]($code$/java/jdocs/actor/FaultHandlingDocSample.java) { #all }