org.apache.hadoop.hbase.util
Class RetryCounter

java.lang.Object
  extended by org.apache.hadoop.hbase.util.RetryCounter

@InterfaceAudience.Private
public class RetryCounter
extends Object


Constructor Summary
RetryCounter(int maxRetries, int retryIntervalMillis, TimeUnit timeUnit)
           
 
Method Summary
 int getAttemptTimes()
           
 int getMaxRetries()
           
 boolean shouldRetry()
           
 void sleepUntilNextRetry()
          Sleep for a exponentially back off time
 void useRetry()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RetryCounter

public RetryCounter(int maxRetries,
                    int retryIntervalMillis,
                    TimeUnit timeUnit)
Method Detail

getMaxRetries

public int getMaxRetries()

sleepUntilNextRetry

public void sleepUntilNextRetry()
                         throws InterruptedException
Sleep for a exponentially back off time

Throws:
InterruptedException

shouldRetry

public boolean shouldRetry()

useRetry

public void useRetry()

getAttemptTimes

public int getAttemptTimes()


Copyright © 2013 The Apache Software Foundation. All Rights Reserved.