-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Description
Currently, there are only 2 actual states
- closed -> flowing, operations are executed and until n Failures occur, these operations are attempted to be executed
- open -> broken, operations are returned immediately without being executed until the retryTime elapses
But there is a third state: waiting -> the time after a the retryTime elapses and the next operation is executed. If it is successful, the state is changed to closed, otherwise the state changes to broken
Currently there is no way for external listeners to listen for this state change
I propose the following:
* Called when a the circuit breaker is attempting to reset (i.e. open -> waiting)
*
* @param name - name of the circuit breaker
*/
def onAttemptReset(name: String): Unit = { /* blank default implementation */ }
but to be consistent, an actual waiting state should be built as this state is currently mangled with broken.
Metadata
Metadata
Assignees
Labels
No labels