@Override
    public void success() {
        failingSinceNanos.set(never);
        if ( ! open.get() && halfOpen.compareAndSet(true, false))
            log.log(INFO, "Circuit breaker is now closed, after a request was successful");
    }
Creates a new circuit breaker with the given grace periods.
@param grace the period of consecutive failures before state changes to half-open.
@param doom the period of consecutive failures before shutting down.
vespa-feed-client/src/main/java/ai/vespa/feed/client/impl/GracePeriodCircuitBreaker.java