Interface CircuitBreakerBundle.ExceptionBuilder<T extends io.dropwizard.core.Configuration>
- All Superinterfaces:
CircuitBreakerBundle.FinalBuilder<T>
- All Known Implementing Classes:
CircuitBreakerBundle.Builder
- Enclosing class:
- CircuitBreakerBundle<T extends io.dropwizard.core.Configuration>
public static interface CircuitBreakerBundle.ExceptionBuilder<T extends io.dropwizard.core.Configuration>
extends CircuitBreakerBundle.FinalBuilder<T>
-
Method Summary
Modifier and TypeMethodDescriptionignoreExceptions
(Class<? extends Throwable>... errorClasses) Configures a list of error classes that are ignored as a failure and thus do not increase the failure rate.recordExceptions
(Class<? extends Throwable>... errorClasses) Configures a list of error classes that are recorded as a failure and thus increase the failure rate.Methods inherited from interface org.sdase.commons.server.circuitbreaker.CircuitBreakerBundle.FinalBuilder
build
-
Method Details
-
recordExceptions
CircuitBreakerBundle.ExceptionBuilder<T> recordExceptions(Class<? extends Throwable>... errorClasses) Configures a list of error classes that are recorded as a failure and thus increase the failure rate. Any exception matching or inheriting from one of the list should count as a failure, unless ignored- Parameters:
errorClasses
- the error classes that are recorded- Returns:
- the same builder instance
-
ignoreExceptions
CircuitBreakerBundle.ExceptionBuilder<T> ignoreExceptions(Class<? extends Throwable>... errorClasses) Configures a list of error classes that are ignored as a failure and thus do not increase the failure rate. Any exception matching or inheriting from one of the list will not count as a failure, even if marked via record.- Parameters:
errorClasses
- the error classes that are ignored- Returns:
- the same builder instance
-