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 @@ import java.util.concurrent.atomic.AtomicReference;
|
|||
* Base class for circuit breakers.
|
||||
*
|
||||
* @param <T> the type of the value monitored by this circuit breaker
|
||||
* @since 3.5
|
||||
*/
|
||||
public abstract class AbstractCircuitBreaker<T> implements CircuitBreaker<T> {
|
||||
/**
|
||||
|
@ -39,7 +40,7 @@ public abstract class AbstractCircuitBreaker<T> implements CircuitBreaker<T> {
|
|||
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() {
|
||||
changeSupport = new PropertyChangeSupport(this);
|
||||
|
|
|
@ -37,6 +37,7 @@ package org.apache.commons.lang3.concurrent;
|
|||
* </p>
|
||||
*
|
||||
* @param <T> the type of the value monitored by this circuit breaker
|
||||
* @since 3.5
|
||||
*/
|
||||
public interface CircuitBreaker<T> {
|
||||
/**
|
||||
|
|
|
@ -21,6 +21,7 @@ package org.apache.commons.lang3.concurrent;
|
|||
* An exception class used for reporting runtime error conditions related to
|
||||
* circuit breakers.
|
||||
* </p>
|
||||
* @since 3.5
|
||||
*/
|
||||
public class CircuitBreakingException extends RuntimeException {
|
||||
/**
|
||||
|
|
|
@ -133,6 +133,7 @@ import java.util.concurrent.atomic.AtomicReference;
|
|||
* guarantee that the circuit breaker is triggered at a specific point in time; there may
|
||||
* be some delay (less than a check interval).</li>
|
||||
* </ul>
|
||||
* @since 3.5
|
||||
*/
|
||||
public class EventCountCircuitBreaker extends AbstractCircuitBreaker<Integer> {
|
||||
|
||||
|
|
|
@ -49,6 +49,7 @@ import java.util.concurrent.atomic.AtomicLong;
|
|||
* </pre>
|
||||
*
|
||||
* <p>#Thread safe#</p>
|
||||
* @since 3.5
|
||||
*/
|
||||
public class ThresholdCircuitBreaker extends AbstractCircuitBreaker<Long> {
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue