LANG-1085: Add a circuit breaker implementation
add since javadoc tags fix javadoc warning
This commit is contained in:
parent
c049aeeffd
commit
528f6e8e70
|
@ -24,6 +24,7 @@
|
||||||
* Base class for circuit breakers.
|
* Base class for circuit breakers.
|
||||||
*
|
*
|
||||||
* @param <T> the type of the value monitored by this circuit breaker
|
* @param <T> the type of the value monitored by this circuit breaker
|
||||||
|
* @since 3.5
|
||||||
*/
|
*/
|
||||||
public abstract class AbstractCircuitBreaker<T> implements CircuitBreaker<T> {
|
public abstract class AbstractCircuitBreaker<T> implements CircuitBreaker<T> {
|
||||||
/**
|
/**
|
||||||
|
@ -39,7 +40,7 @@ public abstract class AbstractCircuitBreaker<T> implements CircuitBreaker<T> {
|
||||||
private final PropertyChangeSupport changeSupport;
|
private final PropertyChangeSupport changeSupport;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates an {@AbstractCircuitBreaker}. It also creates an internal {@code PropertyChangeSupport}.
|
* Creates an {@code AbstractCircuitBreaker}. It also creates an internal {@code PropertyChangeSupport}.
|
||||||
*/
|
*/
|
||||||
public AbstractCircuitBreaker() {
|
public AbstractCircuitBreaker() {
|
||||||
changeSupport = new PropertyChangeSupport(this);
|
changeSupport = new PropertyChangeSupport(this);
|
||||||
|
|
|
@ -37,6 +37,7 @@
|
||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
* @param <T> the type of the value monitored by this circuit breaker
|
* @param <T> the type of the value monitored by this circuit breaker
|
||||||
|
* @since 3.5
|
||||||
*/
|
*/
|
||||||
public interface CircuitBreaker<T> {
|
public interface CircuitBreaker<T> {
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
* An exception class used for reporting runtime error conditions related to
|
* An exception class used for reporting runtime error conditions related to
|
||||||
* circuit breakers.
|
* circuit breakers.
|
||||||
* </p>
|
* </p>
|
||||||
|
* @since 3.5
|
||||||
*/
|
*/
|
||||||
public class CircuitBreakingException extends RuntimeException {
|
public class CircuitBreakingException extends RuntimeException {
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -133,6 +133,7 @@
|
||||||
* guarantee that the circuit breaker is triggered at a specific point in time; there may
|
* guarantee that the circuit breaker is triggered at a specific point in time; there may
|
||||||
* be some delay (less than a check interval).</li>
|
* be some delay (less than a check interval).</li>
|
||||||
* </ul>
|
* </ul>
|
||||||
|
* @since 3.5
|
||||||
*/
|
*/
|
||||||
public class EventCountCircuitBreaker extends AbstractCircuitBreaker<Integer> {
|
public class EventCountCircuitBreaker extends AbstractCircuitBreaker<Integer> {
|
||||||
|
|
||||||
|
|
|
@ -49,6 +49,7 @@
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* <p>#Thread safe#</p>
|
* <p>#Thread safe#</p>
|
||||||
|
* @since 3.5
|
||||||
*/
|
*/
|
||||||
public class ThresholdCircuitBreaker extends AbstractCircuitBreaker<Long> {
|
public class ThresholdCircuitBreaker extends AbstractCircuitBreaker<Long> {
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue