Skip to content

Commit

Permalink
ReactiveX#159 added new states, missing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rLitto authored and rLitto committed Jan 29, 2018
1 parent b4c13a0 commit 0401b33
Showing 1 changed file with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,22 @@ public interface CircuitBreaker {
void onSuccess(long durationInNanos);


/**
* Transitions the state machine to a DISABLED state, stopping state transition, metrics and event publishing.
*
* Should only be used, when you want to disable the circuit breaker allowing all calls to pass.
* To recover from this state you must force a new state transition
*/
void disable();

/**
* Transitions the state machine to a FORCED_OPEN state, stopping state transition, metrics and event publishing.
*
* Should only be used, when you want to disable the circuit breaker allowing no call to pass.
* To recover from this state you must force a new state transition
*/
void forceOpen();

/**
* Returns the circuit breaker to its original closed state, losing statistics.
*
Expand Down

0 comments on commit 0401b33

Please sign in to comment.