@Dependent public class CircuitBreakerConfigBean extends Object
Constructor and Description |
---|
CircuitBreakerConfigBean() |
Modifier and Type | Method and Description |
---|---|
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.
|
@CircuitBreaker(requestVolumeThreshold=2, failOn=TestConfigExceptionB.class) public void failOnMethod()
@CircuitBreaker(requestVolumeThreshold=2) public void skipOnMethod()
@CircuitBreaker(requestVolumeThreshold=2, delay=20L, delayUnit=MICROS) public void delayMethod(boolean fail)
@CircuitBreaker(requestVolumeThreshold=2) public void requestVolumeThresholdMethod()
@CircuitBreaker(requestVolumeThreshold=10, failureRatio=1.0) public void failureRatioMethod(boolean fail)
@CircuitBreaker(requestVolumeThreshold=10, successThreshold=4, delay=1000L) public void successThresholdMethod(boolean fail)
Copyright © 2016 – 2021 Eclipse Foundation. All rights reserved.
Use is subject to license terms.