public class RetryUtils extends Object
限定符和类型 | 字段和说明 |
---|---|
static org.apache.commons.logging.Log |
LOG |
构造器和说明 |
---|
RetryUtils() |
限定符和类型 | 方法和说明 |
---|---|
static RetryPolicy |
getDefaultRetryPolicy(Configuration conf,
String retryPolicyEnabledKey,
boolean defaultRetryPolicyEnabled,
String retryPolicySpecKey,
String defaultRetryPolicySpec,
Class<? extends Exception>... remoteExceptionsToRetry)
Return the default retry policy set in conf.
|
static RetryPolicy |
getMultipleLinearRandomRetry(Configuration conf,
String retryPolicyEnabledKey,
boolean defaultRetryPolicyEnabled,
String retryPolicySpecKey,
String defaultRetryPolicySpec)
Return the MultipleLinearRandomRetry policy specified in the conf,
or null if the feature is disabled.
|
public static RetryPolicy getDefaultRetryPolicy(Configuration conf, String retryPolicyEnabledKey, boolean defaultRetryPolicyEnabled, String retryPolicySpecKey, String defaultRetryPolicySpec, Class<? extends Exception>... remoteExceptionsToRetry)
conf
- retryPolicyEnabledKey
- conf property key for enabling retrydefaultRetryPolicyEnabled
- default retryPolicyEnabledKey conf valueretryPolicySpecKey
- conf property key for retry policy specdefaultRetryPolicySpec
- default retryPolicySpecKey conf valueremoteExceptionsToRetry
- The particular RemoteExceptions to retrypublic static RetryPolicy getMultipleLinearRandomRetry(Configuration conf, String retryPolicyEnabledKey, boolean defaultRetryPolicyEnabled, String retryPolicySpecKey, String defaultRetryPolicySpec)
conf
- retryPolicyEnabledKey
- conf property key for enabling retrydefaultRetryPolicyEnabled
- default retryPolicyEnabledKey conf valueretryPolicySpecKey
- conf property key for retry policy specdefaultRetryPolicySpec
- default retryPolicySpecKey conf valueCopyright © 2009 The Apache Software Foundation