public class CertainCodeNotRetryStrategy extends BaseWriterRetryStrategy
timeout| Constructor and Description |
|---|
CertainCodeNotRetryStrategy() |
CertainCodeNotRetryStrategy(long timeout,
TimeUnit unit) |
| Modifier and Type | Method and Description |
|---|---|
RetryStrategy |
clone()
返回一个同类型且尚未重试的RetryStrategy对象。
|
long |
nextPause(String action,
Exception ex)
得到发起第retries次重试前延迟的时间。SDK会在这一段时间之后发起第retries次重试。
若返回值小于等于0, 表示不重试.
|
protected boolean |
retryNotMatterActions(String errorCode)
不做重试的误码集合:其他默认重试
OTSParameterInvalid, OTSConditionCheckFail, OTSRequestBodyTooLarge,
OTSInvalidPK, OTSOutOfColumnCountLimit, OTSOutOfRowSizeLimit,
|
boolean |
shouldRetry(Exception ex)
Writer特殊使用的重试策略,规则为:
1.
|
getRetriespublic CertainCodeNotRetryStrategy()
public CertainCodeNotRetryStrategy(long timeout,
TimeUnit unit)
public RetryStrategy clone()
RetryStrategyclone in interface RetryStrategyclone in class BaseWriterRetryStrategyprotected boolean retryNotMatterActions(String errorCode)
public boolean shouldRetry(Exception ex)
BaseWriterRetryStrategyshouldRetry in class BaseWriterRetryStrategyex - 上次访问失败的错误信息、为ClientException或OTSExceptionpublic long nextPause(String action, Exception ex)
RetryStrategynextPause in interface RetryStrategynextPause in class BaseWriterRetryStrategyaction - 操作名,比如"ListTable"、"GetRow"、"PutRow"等ex - 上次访问失败的错误信息、为ClientException或TableStoreExceptionCopyright © 2024. All Rights Reserved.