return new Builder();
}
public static class Builder {
private int maxFailures = DEFAULT_MAX_FAILURES;
private int waitInterval = DEFAULT_WAIT_INTERVAL;
<BUG>private Optional<CircuitBreakerEventListener> circuitBreakerEventListener = Optional.empty();
private List<Class<? extends Throwable>> ignoredExceptions = new ArrayList<>();</BUG>
public Builder maxFailures(int maxFailures) {
if (maxFailures < 1) {
throw new IllegalArgumentException("maxFailures must be greater than or equal to 1");

return new Builder();
}
public static class Builder {
private int maxFailures = DEFAULT_MAX_FAILURES;
private int waitInterval = DEFAULT_WAIT_INTERVAL;
private CircuitBreakerEventListener circuitBreakerEventListener = new DefaultCircuitBreakerEventListener();
private List<Class<? extends Throwable>> ignoredExceptions = new ArrayList<>();
public Builder maxFailures(int maxFailures) {
if (maxFailures < 1) {
throw new IllegalArgumentException("maxFailures must be greater than or equal to 1");
