LANG-1085: Add a circuit breaker implementation

add since javadoc tags

fix javadoc warning
This commit is contained in:
pascalschumacher 2016-06-08 22:15:13 +02:00
parent c049aeeffd
commit 528f6e8e70
5 changed files with 6 additions and 1 deletions

View File

@ -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);

View File

@ -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> {
/** /**

View File

@ -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 {
/** /**

View File

@ -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> {

View File

@ -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> {
/** /**