org.eclipse.microprofile.fault.tolerance.tck.config

## Class CircuitBreakerConfigBean

- java.lang.Object
- - org.eclipse.microprofile.fault.tolerance.tck.config.CircuitBreakerConfigBean

    @Dependent
    public class CircuitBreakerConfigBean
    extends Object

Suite of methods for testing the various parameters of CircuitBreaker

### Constructor Summary

Constructors
Constructor and Description
`CircuitBreakerConfigBean()`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `delayMethod(boolean fail)` This method's circuit breaker moves from open to half-open after 10 micros, unless delay and delayUnit are configured differently.
`void` `failOnMethod()` Method throws TestConfigExceptionA which will NOT result in CircuitBreakerOpenException on the third call, unless failOn is configured to TestConfigExceptionA.
`void` `failureRatioMethod(boolean fail)` This method's circuit breaker moves from closed to open after 10 consecutive failures, unless failureRatio is configured differently.
`void` `requestVolumeThresholdMethod()` Method throws TestConfigExceptionA which will result in CircuitBreakerOpenException on the third call, unless requestVolumeThreshold is configured to a greater number.
`void` `skipOnMethod()` Method throws TestConfigExceptionA which will result in CircuitBreakerOpenException on the third call, unless skipOn is configured to TestConfigExceptionA.
`void` `successThresholdMethod(boolean fail)` This method's circuit breaker moves from half-open to closed after 4 consecutive successes, unless successThreshold is configured differently.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### CircuitBreakerConfigBean

    public CircuitBreakerConfigBean()

### Method Detail

#### failOnMethod

    @CircuitBreaker(requestVolumeThreshold=2,
                    failOn=TestConfigExceptionB.class)
    public void failOnMethod()

Method throws TestConfigExceptionA which will NOT result in CircuitBreakerOpenException on the third call, unless failOn is configured to TestConfigExceptionA.

#### skipOnMethod

    @CircuitBreaker(requestVolumeThreshold=2)
    public void skipOnMethod()

Method throws TestConfigExceptionA which will result in CircuitBreakerOpenException on the third call, unless skipOn is configured to TestConfigExceptionA.

#### delayMethod

    @CircuitBreaker(requestVolumeThreshold=2,
                    delay=20L,
                    delayUnit=MICROS)
    public void delayMethod(boolean fail)

This method's circuit breaker moves from open to half-open after 10 micros, unless delay and delayUnit are configured differently.

#### requestVolumeThresholdMethod

    @CircuitBreaker(requestVolumeThreshold=2)
    public void requestVolumeThresholdMethod()

Method throws TestConfigExceptionA which will result in CircuitBreakerOpenException on the third call, unless requestVolumeThreshold is configured to a greater number.

#### failureRatioMethod

    @CircuitBreaker(requestVolumeThreshold=10,
                    failureRatio=1.0)
    public void failureRatioMethod(boolean fail)

This method's circuit breaker moves from closed to open after 10 consecutive failures, unless failureRatio is configured differently.

#### successThresholdMethod

    @CircuitBreaker(requestVolumeThreshold=10,
                    successThreshold=4,
                    delay=1000L)
    public void successThresholdMethod(boolean fail)

This method's circuit breaker moves from half-open to closed after 4 consecutive successes, unless successThreshold is configured differently.