public static class RetryPolicies.MultipleLinearRandomRetry extends Object implements RetryPolicy
限定符和类型 | 类和说明 |
---|---|
static class |
RetryPolicies.MultipleLinearRandomRetry.Pair
Pairs of numRetries and sleepSeconds
|
构造器和说明 |
---|
RetryPolicies.MultipleLinearRandomRetry(List<RetryPolicies.MultipleLinearRandomRetry.Pair> pairs) |
限定符和类型 | 方法和说明 |
---|---|
boolean |
equals(Object that) |
int |
hashCode() |
static RetryPolicies.MultipleLinearRandomRetry |
parseCommaSeparatedString(String s)
Parse the given string as a MultipleLinearRandomRetry object.
|
boolean |
shouldRetry(Exception e,
int curRetry)
Determines whether the framework should retry a
method for the given exception, and the number
of retries that have been made for that operation
so far.
|
String |
toString() |
public RetryPolicies.MultipleLinearRandomRetry(List<RetryPolicies.MultipleLinearRandomRetry.Pair> pairs)
public boolean shouldRetry(Exception e, int curRetry) throws Exception
RetryPolicy
Determines whether the framework should retry a method for the given exception, and the number of retries that have been made for that operation so far.
shouldRetry
在接口中 RetryPolicy
e
- The exception that caused the method to fail.curRetry
- The number of times the method has been retried.true
if the method should be retried,
false
if the method should not be retried
but shouldn't fail with an exception (only for void methods).Exception
- The re-thrown exception e
indicating
that the method failed and should not be retried further.public static RetryPolicies.MultipleLinearRandomRetry parseCommaSeparatedString(String s)
Copyright © 2009 The Apache Software Foundation