Skip to content

Commit c7320ae

Browse files
committed
doc:Translated comments from Chinese to English for better understanding.
1 parent f892876 commit c7320ae

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

agora-rest-client-core/src/main/java/io/agora/rest/core/DomainPool.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ private boolean domainNeedUpdate() {
4949
}
5050

5151
public void selectBestDomain() {
52-
// 提前判断domain是否需要更新,避免多线程情况下重复获取锁
52+
// Check if domain needs updating first to avoid acquiring locks unnecessarily in multi-threaded scenarios
5353
if (!domainNeedUpdate()) {
5454
return;
5555
}

agora-rest-client-core/src/main/java/io/agora/rest/services/cloudrecording/api/StartResourceAPI.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,12 @@ public Mono<StartResourceRes> handle(String resourceId, CloudRecordingModeEnum m
3838

3939

4040
private RetryBackoffSpec customRetry(int maxAttempts, Predicate<Throwable> retryPredicate) {
41-
return Retry.backoff(maxAttempts, Duration.ofSeconds(1)) // 最多重试5次,初始间隔1秒
42-
.maxBackoff(Duration.ofSeconds(5)) // 最大间隔5秒
43-
.filter(retryPredicate) // 重试条件
41+
return Retry.backoff(maxAttempts, Duration.ofSeconds(1)) // Maximum 5 retry attempts, initial 1-second interval
42+
.maxBackoff(Duration.ofSeconds(5)) // Maximum 5-second interval
43+
.filter(retryPredicate) // Retry condition
4444
.doBeforeRetry(retrySignal -> {
45-
long retryCount = retrySignal.totalRetries() + 1; // 第几次重试
46-
Duration nextBackoff = Duration.ofSeconds(retryCount); // 下次重试间隔
45+
long retryCount = retrySignal.totalRetries() + 1; // Current retry attempt number
46+
Duration nextBackoff = Duration.ofSeconds(retryCount); // Next retry interval
4747
logger.warn("Retry attempt: {}, next backoff: {}", retryCount, nextBackoff);
4848
}).onRetryExhaustedThrow((retryBackoffSpec, retrySignal) -> {
4949
logger.error("Retry exhausted: {}", retrySignal.totalRetries());

0 commit comments

Comments
 (0)