Interface CircuitBreakerListener
- All Known Implementing Classes:
CircuitBreakerListenerAdapter
,MetricCollectingCircuitBreakerListener
public interface CircuitBreakerListener
The listener interface for receiving
CircuitBreaker
events.-
Method Summary
Modifier and Type Method Description void
onEventCountUpdated(String circuitBreakerName, EventCount eventCount)
Invoked when the circuit breaker's internalEventCount
is updated.default void
onInitialized(String circuitBreakerName, CircuitState initialState)
Invoked when the circuit breaker is initialized.void
onRequestRejected(String circuitBreakerName)
Invoked when the circuit breaker rejects a request.void
onStateChanged(String circuitBreakerName, CircuitState state)
Invoked when the circuit state is changed.
-
Method Details
-
onInitialized
Invoked when the circuit breaker is initialized.- Throws:
Exception
-
onStateChanged
Invoked when the circuit state is changed.- Throws:
Exception
-
onEventCountUpdated
Invoked when the circuit breaker's internalEventCount
is updated.- Throws:
Exception
-
onRequestRejected
Invoked when the circuit breaker rejects a request.- Throws:
Exception
-