Class CircuitBreaker.Config.Builder
java.lang.Object
cloud.opencode.base.cache.protection.CircuitBreaker.Config.Builder
- Enclosing class:
CircuitBreaker.Config
public static class Builder
- Since:
- JDK 25, opencode-base-cache V1.0.0
- Author:
- Leon Soo www.LeonSoo.com
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()build | buildfailureRateThreshold(double threshold) failureRateThreshold | failureRateThresholdfailureThreshold(int threshold) failureThreshold | failureThresholdhalfOpenRequests(int requests) halfOpenRequests | halfOpenRequestsopenDuration(Duration duration) openDuration | openDuration
-
Constructor Details
-
Builder
public Builder()Creates a new Builder instance | 创建新的 Builder 实例
-
-
Method Details
-
failureThreshold
failureThreshold | failureThreshold- Parameters:
threshold- the threshold | threshold- Returns:
- the result | 结果
-
openDuration
openDuration | openDuration- Parameters:
duration- the duration | duration- Returns:
- the result | 结果
-
halfOpenRequests
halfOpenRequests | halfOpenRequests- Parameters:
requests- the requests | requests- Returns:
- the result | 结果
-
failureRateThreshold
failureRateThreshold | failureRateThreshold- Parameters:
threshold- the threshold | threshold- Returns:
- the result | 结果
-
build
-