/** * {@inheritDoc} * * <p>If the threshold is zero, the circuit breaker will be in a permanent <em>open</em> state.</p> */ @Override public boolean incrementAndCheckState(final Long increment) { if (threshold == 0) { open(); } final long used = this.used.addAndGet(increment); if (used > threshold) { open(); } return checkState(); }
/** * {@inheritDoc} * * <p>If the threshold is zero, the circuit breaker will be in a permanent <em>open</em> state.</p> */ @Override public boolean incrementAndCheckState(final Long increment) { if (threshold == 0) { open(); } final long used = this.used.addAndGet(increment); if (used > threshold) { open(); } return checkState(); }
/** * {@inheritDoc} * * <p>If the threshold is zero, the circuit breaker will be in a permanent <em>open</em> state.</p> */ @Override public boolean incrementAndCheckState(final Long increment) { if (threshold == 0) { open(); } final long used = this.used.addAndGet(increment); if (used > threshold) { open(); } return checkState(); }
/** * {@inheritDoc} * * <p>If the threshold is zero, the circuit breaker will be in a permanent <em>open</em> state.</p> */ @Override public boolean incrementAndCheckState(final Long increment) { if (threshold == 0) { open(); } final long used = this.used.addAndGet(increment); if (used > threshold) { open(); } return checkState(); }