Package org.apache.hadoop.hbase.util
Class RetryCounter
java.lang.Object
org.apache.hadoop.hbase.util.RetryCounter
Operation retry accounting. Use to calculate wait period,
 
getBackoffTimeAndIncrementAttempts()}, or for performing wait,
 sleepUntilNextRetry(), in accordance with a RetryCounter.RetryConfig, initial settings, and a
 Retry Policy, (See org.apache.hadoop.io.retry.RetryPolicy). Like guava-retrying.- Since:
- 0.92.0
- See Also:
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic classPolicy for calculating sleeping intervals between retry attemptsstatic classstatic classstatic classConfiguration for a retry counter
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate intprivate static final org.slf4j.Loggerprivate RetryCounter.RetryConfig
- 
Constructor SummaryConstructorsConstructorDescriptionRetryCounter(int maxAttempts, long sleepInterval, TimeUnit timeUnit) RetryCounter(RetryCounter.RetryConfig retryConfig) 
- 
Method Summary
- 
Field Details- 
LOG
- 
retryConfig
- 
attempts
 
- 
- 
Constructor Details- 
RetryCounter
- 
RetryCounter
 
- 
- 
Method Details- 
addJitter
- 
getMaxAttempts
- 
sleepUntilNextRetrySleep for a back off time as supplied by the backoff policy, and increases the attempts- Throws:
- InterruptedException
 
- 
shouldRetry
- 
useRetry
- 
isRetry
- 
getAttemptTimes
- 
getBackoffTime
- 
getBackoffTimeAndIncrementAttempts
 
-