Package akka.pattern.internal
Interface CircuitBreakerTelemetry
-
- All Known Implementing Classes:
CircuitBreakerNoopTelemetry$
public interface CircuitBreakerTelemetry
Service 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 void
onCallBreakerOpenFailure()
Invoked for each call when the future is completed withakka.pattern.CircuitBreakerOpenException
void
onCallFailure(long elapsedNanos)
Invoked for each call when the future is completed with exception, except forscala.concurrent.TimeoutException
andCircuitBreakerOpenException
that are handled by separate methods.void
onCallSuccess(long elapsedNanos)
Invoked for each successful call.void
onCallTimeoutFailure(long elapsedNanos)
Invoked for each call when the future is completed withjava.util.concurrent.TimeoutException
void
onClose()
Invoked when the circuit breaker transitions to the close state.void
onHalfOpen()
Invoked when the circuit breaker transitions to the half-open state after reset timeout.void
onOpen()
Invoked when the circuit breaker transitions to the open state.void
stopped()
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.TimeoutException
andCircuitBreakerOpenException
that 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)
.
-
-