public synchronized long getWaitIntervalMs(final long amount) {
    assert amount >= 0;
    if (!isAvailable(amount)) {
      return waitInterval(amount);
    }
    return 0;
  }
Are there enough available resources to allow execution?
@param amount the number of required resources, a non-negative number
@return the waitInterval to backoff, or 0 if execution is allowed
hbase-server/src/main/java/org/apache/hadoop/hbase/quotas/RateLimiter.java