| 程序包 | 说明 |
|---|---|
| org.apache.ratis.protocol.exceptions | |
| org.apache.ratis.retry |
| 构造器和说明 |
|---|
RaftRetryFailureException(RaftClientRequest request,
int attemptCount,
RetryPolicy retryPolicy,
Throwable cause) |
| 限定符和类型 | 类和说明 |
|---|---|
class |
ExceptionDependentRetry
Exception dependent retry policy.
|
class |
ExponentialBackoffRetry
Retry Policy exponentially increases sleep time with randomness on successive
retries.
|
class |
MultipleLinearRandomRetry
Given pairs of number of retries and sleep time (n0, t0), (n1, t1), ...,
the first n0 retries sleep t0 milliseconds on average,
the following n1 retries sleep t1 milliseconds on average, and so on.
|
static class |
RetryPolicies.NoRetry |
static class |
RetryPolicies.RetryForeverNoSleep |
static class |
RetryPolicies.RetryForeverWithSleep
For any requests, keep retrying forever with a fixed sleep time between attempts.
|
static class |
RetryPolicies.RetryLimited
For any requests, keep retrying a limited number of attempts with a fixed sleep time between attempts.
|
| 限定符和类型 | 方法和说明 |
|---|---|
static RetryPolicy |
RetryPolicies.noRetry()
No retry.
|
static RetryPolicy |
RetryPolicies.retryForeverNoSleep()
For any requests, keep retrying forever with no sleep between attempts.
|
| 限定符和类型 | 方法和说明 |
|---|---|
ExceptionDependentRetry.Builder |
ExceptionDependentRetry.Builder.setDefaultPolicy(RetryPolicy retryPolicy) |
ExceptionDependentRetry.Builder |
ExceptionDependentRetry.Builder.setExceptionToPolicy(Class<? extends Throwable> exception,
RetryPolicy retryPolicy) |
Copyright © 2017–2023 The Apache Software Foundation. All rights reserved.