接口 CircuitBreakerStateChangeObserver


public interface CircuitBreakerStateChangeObserver
从以下版本开始:
1.8.0
作者:
Eric Zhao
  • 方法详细资料

    • onStateChange

      void onStateChange(CircuitBreaker.State prevState, CircuitBreaker.State newState, DegradeRule rule, Double snapshotValue)

      Observer method triggered when circuit breaker state changed. The transformation could be:

      • From CLOSED to OPEN (with the triggered metric)
      • From OPEN to HALF_OPEN
      • From OPEN to CLOSED
      • From HALF_OPEN to OPEN (with the triggered metric)
      参数:
      prevState - previous state of the circuit breaker
      newState - new state of the circuit breaker
      rule - associated rule
      snapshotValue - triggered value on circuit breaker opens (null if the new state is CLOSED or HALF_OPEN)