public class DefaultRetryInterceptor extends BaseRetryInterceptor
| 限定符和类型 | 字段和说明 |
|---|---|
private static org.slf4j.Logger |
logger |
| 构造器和说明 |
|---|
DefaultRetryInterceptor() |
| 限定符和类型 | 方法和说明 |
|---|---|
protected okhttp3.Response |
retryIntercept(int maxRetries,
int intervalMs,
RetryRule[] retryRules,
okhttp3.Interceptor.Chain chain)
process a retryable request
The access level here is set to protected, which can facilitate business personalized expansion
这里访问级别设置为protected,可方便业务个性化扩展
|
private boolean |
shouldThrowEx(HashSet<RetryRule> retryRuleSet,
Exception e) |
intercept, setEnableGlobalRetry, setGlobalIntervalMs, setGlobalMaxRetries, setGlobalRetryRulesprotected okhttp3.Response retryIntercept(int maxRetries,
int intervalMs,
RetryRule[] retryRules,
okhttp3.Interceptor.Chain chain)
BaseRetryInterceptorretryIntercept 在类中 BaseRetryInterceptormaxRetries - 最大重试次数。Maximum number of retriesintervalMs - 重试时间间隔。Retry intervalretryRules - 重试规则。Retry ruleschain - 执行链。Execution chainCopyright © 2021. All rights reserved.