/** * {@inheritDoc} */ @Override public void open() { changeState(State.OPEN); }
/** * {@inheritDoc} * * <p>Resets the internal counter back to its initial value (zero).</p> */ @Override public void close() { super.close(); this.used.set(INITIAL_COUNT); }
/** * {@inheritDoc} */ @Override public boolean isClosed() { return !isOpen(); }
/** * {@inheritDoc} This circuit breaker may close itself again if the number of events * received during a check interval goes below the closing threshold. If this circuit * breaker is already open, this method has no effect, except that a new check * interval is started. */ @Override public void open() { super.open(); checkIntervalData.set(new CheckIntervalData(0, now())); }
/** * {@inheritDoc} This circuit breaker may close itself again if the number of events * received during a check interval goes below the closing threshold. If this circuit * breaker is already open, this method has no effect, except that a new check * interval is started. */ @Override public void open() { super.open(); checkIntervalData.set(new CheckIntervalData(0, now())); }
/** * {@inheritDoc} */ @Override public boolean isOpen() { return isOpen(state.get()); }
/** * {@inheritDoc} */ @Override public void close() { changeState(State.CLOSED); }
/** * {@inheritDoc} A new check interval is started. If too many events are received in * this interval, the circuit breaker changes again to state open. If this circuit * breaker is already closed, this method has no effect, except that a new check * interval is started. */ @Override public void close() { super.close(); checkIntervalData.set(new CheckIntervalData(0, now())); }
/** * {@inheritDoc} This circuit breaker may close itself again if the number of events * received during a check interval goes below the closing threshold. If this circuit * breaker is already open, this method has no effect, except that a new check * interval is started. */ @Override public void open() { super.open(); checkIntervalData.set(new CheckIntervalData(0, now())); }
/** * Changes the internal state of this circuit breaker. If there is actually a change * of the state value, all registered change listeners are notified. * * @param newState the new state to be set */ protected void changeState(final State newState) { if (state.compareAndSet(newState.oppositeState(), newState)) { changeSupport.firePropertyChange(PROPERTY_NAME, !isOpen(newState), isOpen(newState)); } }
/** * {@inheritDoc} */ @Override public void open() { changeState(State.OPEN); }
/** * {@inheritDoc} * * <p>Resets the internal counter back to its initial value (zero).</p> */ @Override public void close() { super.close(); this.used.set(INITIAL_COUNT); }
/** * {@inheritDoc} This circuit breaker may close itself again if the number of events * received during a check interval goes below the closing threshold. If this circuit * breaker is already open, this method has no effect, except that a new check * interval is started. */ @Override public void open() { super.open(); checkIntervalData.set(new CheckIntervalData(0, now())); }
/** * {@inheritDoc} */ @Override public boolean isClosed() { return !isOpen(); }
/** * {@inheritDoc} */ @Override public void close() { changeState(State.CLOSED); }
/** * {@inheritDoc} * * <p>Resets the internal counter back to its initial value (zero).</p> */ @Override public void close() { super.close(); this.used.set(INITIAL_COUNT); }
/** * {@inheritDoc} */ @Override public boolean isClosed() { return !isOpen(); }
/** * {@inheritDoc} */ @Override public void close() { changeState(State.CLOSED); }
/** * {@inheritDoc} * * <p>Resets the internal counter back to its initial value (zero).</p> */ @Override public void close() { super.close(); this.used.set(INITIAL_COUNT); }
/** * {@inheritDoc} */ @Override public boolean isClosed() { return !isOpen(); }