public static final class UpdateCircuitBreakerRuleRequest.Builder extends Object
| 限定符和类型 | 方法和说明 |
|---|---|
UpdateCircuitBreakerRuleRequest.Builder |
acceptLanguage(String acceptLanguage)
The language of the response.
|
UpdateCircuitBreakerRuleRequest.Builder |
appId(String appId)
The ID of the application.
|
UpdateCircuitBreakerRuleRequest.Builder |
appName(String appName)
The name of the application.
|
UpdateCircuitBreakerRuleRequest |
build() |
UpdateCircuitBreakerRuleRequest.Builder |
enable(Boolean enable)
Specifies whether to enable the rule.
|
UpdateCircuitBreakerRuleRequest.Builder |
halfOpenBaseAmountPerStep(Integer halfOpenBaseAmountPerStep)
The minimum number of requests that can be passed in each step after circuit breaking recovers.
|
UpdateCircuitBreakerRuleRequest.Builder |
halfOpenRecoveryStepNum(Integer halfOpenRecoveryStepNum)
The number of circuit breaking recovery steps.
|
UpdateCircuitBreakerRuleRequest.Builder |
maxAllowedRtMs(Integer maxAllowedRtMs)
The maximum response time (RT).
|
UpdateCircuitBreakerRuleRequest.Builder |
minRequestAmount(Integer minRequestAmount)
The minimum number of requests to trigger circuit breaking.
|
UpdateCircuitBreakerRuleRequest.Builder |
namespace(String namespace)
The microservice namespace to which the application belongs.
|
UpdateCircuitBreakerRuleRequest.Builder |
retryTimeoutMs(Integer retryTimeoutMs)
The period in which circuit breaking is implemented.
|
UpdateCircuitBreakerRuleRequest.Builder |
ruleId(Long ruleId)
The rule ID.
|
UpdateCircuitBreakerRuleRequest.Builder |
statIntervalMs(Integer statIntervalMs)
The length of the time window.
|
UpdateCircuitBreakerRuleRequest.Builder |
strategy(Integer strategy)
The threshold type.
|
UpdateCircuitBreakerRuleRequest.Builder |
threshold(Float threshold)
A percentage threshold for triggering circuit breaking.
|
public UpdateCircuitBreakerRuleRequest.Builder acceptLanguage(String acceptLanguage)
The language of the response. Valid values: zh-CN and en-US. Default value: zh-CN. The value zh-CN indicates Chinese, and the value en-US indicates English.
example:zh
public UpdateCircuitBreakerRuleRequest.Builder appId(String appId)
The ID of the application.
example:hkhon1po62@c3df23522bXXXXX
public UpdateCircuitBreakerRuleRequest.Builder appName(String appName)
The name of the application.
This parameter is required.
example:spring-cloud-a
public UpdateCircuitBreakerRuleRequest.Builder enable(Boolean enable)
Specifies whether to enable the rule.
Valid values:
true
false
true
public UpdateCircuitBreakerRuleRequest.Builder halfOpenBaseAmountPerStep(Integer halfOpenBaseAmountPerStep)
The minimum number of requests that can be passed in each step after circuit breaking recovers. Default value: 1.
example:5
public UpdateCircuitBreakerRuleRequest.Builder halfOpenRecoveryStepNum(Integer halfOpenRecoveryStepNum)
The number of circuit breaking recovery steps. Default value: 1.
example:1
public UpdateCircuitBreakerRuleRequest.Builder maxAllowedRtMs(Integer maxAllowedRtMs)
The maximum response time (RT). Unit: milliseconds. If the RT of a request is greater than the value of this parameter, a slow call is counted. If you set Strategy to 0, you must specify this parameter.
example:200
public UpdateCircuitBreakerRuleRequest.Builder minRequestAmount(Integer minRequestAmount)
The minimum number of requests to trigger circuit breaking. If the number of requests in the current time window is less than the value of this parameter, circuit breaking is not triggered even if the circuit breaking rule is met. Default value: 10.
example:10
public UpdateCircuitBreakerRuleRequest.Builder namespace(String namespace)
The microservice namespace to which the application belongs.
This parameter is required.
example:default
public UpdateCircuitBreakerRuleRequest.Builder retryTimeoutMs(Integer retryTimeoutMs)
The period in which circuit breaking is implemented. Unit: milliseconds. If circuit breaking is implemented on the requests for the route, the calls to all the requests for the route fail in the configured circuit breaking period. The value must be an integral multiple of 1,000. Default value: 10000. This value indicates 10 seconds.
example:10000
public UpdateCircuitBreakerRuleRequest.Builder ruleId(Long ruleId)
The rule ID.
This parameter is required.
example:1
public UpdateCircuitBreakerRuleRequest.Builder statIntervalMs(Integer statIntervalMs)
The length of the time window. Unit: milliseconds. The valid range is from 1 second to 120 minutes. The default value is 20000. This value indicates 20 seconds.
example:20000
public UpdateCircuitBreakerRuleRequest.Builder strategy(Integer strategy)
The threshold type.
Valid values:
0
:
slow call proportion
1
:
abnormal proportion
0
public UpdateCircuitBreakerRuleRequest.Builder threshold(Float threshold)
A percentage threshold for triggering circuit breaking. Valid values: 0-1. These values represent 0% to 100%.
example:0.8
public UpdateCircuitBreakerRuleRequest build()
Copyright © 2026. All rights reserved.