1
1
package tech .ydb .common .retry ;
2
2
3
+
3
4
import tech .ydb .core .Status ;
4
5
import tech .ydb .core .UnexpectedResultException ;
5
6
@@ -15,10 +16,10 @@ public interface RetryConfig {
15
16
/**
16
17
* Returns retry policy for the given {@link Status} and {@code null} if that status is not retryable
17
18
*
18
- * @param code status to check
19
+ * @param status status to check
19
20
* @return policy of retries or {@code null} if the status is not retryable
20
21
*/
21
- RetryPolicy getStatusRetryPolicy (Status code );
22
+ RetryPolicy getStatusRetryPolicy (Status status );
22
23
23
24
/**
24
25
* Returns retry policy for the given exception and {@code null} if that exception is not retryable
@@ -36,7 +37,7 @@ default RetryPolicy getThrowableRetryPolicy(Throwable th) {
36
37
}
37
38
38
39
/**
39
- * Infinity retries with default exponential delay.<br>That policy <b>does not</b> retries <i>conditionally</i>
40
+ * Infinity retries with default exponential delay.<br>This policy <b>does not</b> retries <i>conditionally</i>
40
41
* retryable errors so it can be used for both as idempotent and non idempotent operations
41
42
*
42
43
* @return retry configuration object
@@ -46,7 +47,7 @@ static RetryConfig retryForever() {
46
47
}
47
48
48
49
/**
49
- * Retries until the specified elapsed milliseconds expire.<br>That policy <b>does not</b> retries
50
+ * Retries until the specified elapsed milliseconds expire.<br>This policy <b>does not</b> retries
50
51
* <i>conditionally</i> retryable errors so it can be used for both as idempotent and non idempotent operations
51
52
* @param maxElapsedMs maximum timeout for retries
52
53
* @return retry configuration object
@@ -56,7 +57,7 @@ static RetryConfig retryUntilElapsed(long maxElapsedMs) {
56
57
}
57
58
58
59
/**
59
- * Infinity retries with default exponential delay.<br>That policy <b>does</b> retries <i>conditionally</i>
60
+ * Infinity retries with default exponential delay.<br>This policy <b>does</b> retries <i>conditionally</i>
60
61
* retryable errors so it can be used <b>ONLY</b> for idempotent operations
61
62
* @return retry configuration object
62
63
*/
@@ -65,7 +66,7 @@ static RetryConfig idempotentRetryForever() {
65
66
}
66
67
67
68
/**
68
- * Retries until the specified elapsed milliseconds expire.<br>That policy <b>does</b> retries
69
+ * Retries until the specified elapsed milliseconds expire.<br>This policy <b>does</b> retries
69
70
* <i>conditionally</i> retryable errors so it can be used <b>ONLY</b> for idempotent operations
70
71
* @param maxElapsedMs maximum timeout for retries
71
72
* @return retry configuration object
0 commit comments