public static boolean sleepForRetries(String msg, long sleepForRetries, int sleepMultiplier,
    int maxRetriesMultiplier) {
    try {
      LOG.trace("{}, sleeping {} times {}", msg, sleepForRetries, sleepMultiplier);
      Thread.sleep(sleepForRetries * sleepMultiplier);
    } catch (InterruptedException e) {
      LOG.debug("Interrupted while sleeping between retries");
      Thread.currentThread().interrupt();
    }
    return sleepMultiplier < maxRetriesMultiplier;
  }
Do the sleeping logic
@param msg                  Why we sleep
@param sleepForRetries      the base sleep time.
@param sleepMultiplier      by how many times the default sleeping time is augmented
@param maxRetriesMultiplier the max retry multiplier
@return True if <code>sleepMultiplier</code> is &lt; <code>maxRetriesMultiplier</code>
hbase-replication/src/main/java/org/apache/hadoop/hbase/replication/ReplicationUtils.java