From 3471af8463c87c251419e61d0b901a96c5ce0d8b Mon Sep 17 00:00:00 2001 From: Christopher Davenport Date: Fri, 15 Mar 2019 20:54:50 -0400 Subject: [PATCH] Rework Document --- docs/src/main/tut/index.md | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/docs/src/main/tut/index.md b/docs/src/main/tut/index.md index a4803d4..ef70528 100644 --- a/docs/src/main/tut/index.md +++ b/docs/src/main/tut/index.md @@ -50,29 +50,29 @@ breaker is open. The circuit breaker models a concurrent state machine that can be in any of these 3 states: -1. **Closed**: During normal operations or when the `CircuitBreaker` starts +**Closed**: During normal operations or when the `CircuitBreaker` starts - - Exceptions increment the `failures` counter +- Exceptions increment the `failures` counter - - Successes reset the failure count to zero +- Successes reset the failure count to zero - - When the `failures` counter reaches the `maxFailures` count,the breaker is tripped into `Open` state +- When the `failures` counter reaches the `maxFailures` count,the breaker is tripped into `Open` state -2. **Open**: The circuit breaker rejects all tasks with an RejectedExecution +**Open**: The circuit breaker rejects all tasks with an RejectedExecution - - all tasks fail fast with `RejectedExecution` +- all tasks fail fast with `RejectedExecution` - - after the configured `resetTimeout`, the circuit breaker enters a `HalfOpen` state, allowing one task to go through for testing the connection +- after the configured `resetTimeout`, the circuit breaker enters a `HalfOpen` state, allowing one task to go through for testing the connection -3. **HalfOpen**: The circuit breaker has already allowed a task to go through, as a reset attempt, in order to test the connection +**HalfOpen**: The circuit breaker has already allowed a task to go through, as a reset attempt, in order to test the connection - - The first task when `Open` has expired is allowed through without failing fast, just before the circuit breaker is evolved into the `HalfOpen` state +- The first task when `Open` has expired is allowed through without failing fast, just before the circuit breaker is evolved into the `HalfOpen` state - - All tasks attempted in `HalfOpen` fail-fast with an exception just as in `Open` state +- All tasks attempted in `HalfOpen` fail-fast with an exception just as in `Open` state - - If that task attempt succeeds, the breaker is reset back to the `Closed` state, with the `resetTimeout` and the `failures` count also reset to initial values +- If that task attempt succeeds, the breaker is reset back to the `Closed` state, with the `resetTimeout` and the `failures` count also reset to initial values - - If the first call fails, the breaker is tripped again into the `Open` state (the `resetTimeout` is multiplied by the exponential backoff factor) +- If the first call fails, the breaker is tripped again into the `Open` state (the `resetTimeout` is multiplied by the exponential backoff factor) ## Usage