Package akka.pattern.internal
Interface CircuitBreakerTelemetry
- 
- All Known Implementing Classes:
 CircuitBreakerNoopTelemetry$
public interface CircuitBreakerTelemetryService Provider Interface (SPI) for collecting metrics from Circuit Breaker.Implementations must include a single constructor with two arguments: Circuit Breaker id and
ExtendedActorSystem. To setup your implementation, add a setting in yourapplication.conf:akka.circuit-breaker.telemetry.implementations += com.example.MyMetrics 
- 
- 
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidonCallBreakerOpenFailure()Invoked for each call when the future is completed withakka.pattern.CircuitBreakerOpenExceptionvoidonCallFailure(long elapsedNanos)Invoked for each call when the future is completed with exception, except forscala.concurrent.TimeoutExceptionandCircuitBreakerOpenExceptionthat are handled by separate methods.voidonCallSuccess(long elapsedNanos)Invoked for each successful call.voidonCallTimeoutFailure(long elapsedNanos)Invoked for each call when the future is completed withjava.util.concurrent.TimeoutExceptionvoidonClose()Invoked when the circuit breaker transitions to the close state.voidonHalfOpen()Invoked when the circuit breaker transitions to the half-open state after reset timeout.voidonOpen()Invoked when the circuit breaker transitions to the open state.voidstopped()Called when the circuit breaker is removed, e.g. 
 - 
 
- 
- 
Method Detail
- 
onCallBreakerOpenFailure
void onCallBreakerOpenFailure()
Invoked for each call when the future is completed withakka.pattern.CircuitBreakerOpenException 
- 
onCallFailure
void onCallFailure(long elapsedNanos)
Invoked for each call when the future is completed with exception, except forscala.concurrent.TimeoutExceptionandCircuitBreakerOpenExceptionthat are handled by separate methods.- Parameters:
 elapsedNanos- the elapsed duration of the call in nanoseconds
 
- 
onCallSuccess
void onCallSuccess(long elapsedNanos)
Invoked for each successful call.- Parameters:
 elapsedNanos- the elapsed duration of the call in nanoseconds
 
- 
onCallTimeoutFailure
void onCallTimeoutFailure(long elapsedNanos)
Invoked for each call when the future is completed withjava.util.concurrent.TimeoutException- Parameters:
 elapsedNanos- the elapsed duration of the call in nanoseconds
 
- 
onClose
void onClose()
Invoked when the circuit breaker transitions to the close state. 
- 
onHalfOpen
void onHalfOpen()
Invoked when the circuit breaker transitions to the half-open state after reset timeout. 
- 
onOpen
void onOpen()
Invoked when the circuit breaker transitions to the open state. 
- 
stopped
void stopped()
Called when the circuit breaker is removed, e.g. expired due to inactivity. It is also called if the circuit breaker is re-configured, before callingCircuitBreakerTelemetryProvider.start(java.lang.String, akka.actor.ExtendedActorSystem). 
 - 
 
 -