org.apache.hadoop.hbase.util
Class RetryCounter
java.lang.Object
org.apache.hadoop.hbase.util.RetryCounter
@InterfaceAudience.Private
public class RetryCounter
- extends Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RetryCounter
public RetryCounter(int maxAttempts,
long sleepInterval,
TimeUnit timeUnit)
RetryCounter
public RetryCounter(RetryCounter.RetryConfig retryConfig)
getMaxAttempts
public int getMaxAttempts()
sleepUntilNextRetry
public void sleepUntilNextRetry()
throws InterruptedException
- Sleep for a back off time as supplied by the backoff policy, and increases the attempts
- Throws:
InterruptedException
shouldRetry
public boolean shouldRetry()
useRetry
public void useRetry()
isRetry
public boolean isRetry()
getAttemptTimes
public int getAttemptTimes()
Copyright © 2007-2015 The Apache Software Foundation. All Rights Reserved.