jdbc-protolib/src/main/java/com/streamsets/pipeline/lib/jdbc/multithread/JdbcBaseRunnable.java
private void waitIfNeeded() throws InterruptedException {
    if (queryRateLimiter != null) {
      updateGauge(Status.WAITING_FOR_RATE_LIMIT_PERMIT);
      double waitTime = queryRateLimiter.acquire();
      updateGauge(Status.ACQUIRED_RATE_LIMIT_PERMIT);
      gaugeMap.put(LAST_RATE_LIMIT_WAIT_TIME, waitTime);
    } else {
      LOG.debug("No query rate limiter in effect; not waiting");
    }
  }
private void waitIfNeeded() throws InterruptedException {
    if (queryRateLimiter != null) {
      updateGauge(Status.WAITING_FOR_RATE_LIMIT_PERMIT);
      double waitTime = queryRateLimiter.acquire();
      updateGauge(Status.ACQUIRED_RATE_LIMIT_PERMIT);
      gaugeMap.put(LAST_RATE_LIMIT_WAIT_TIME, waitTime);
    } else {
      LOG.debug("No query rate limiter in effect; not waiting");
    }
  }
Wait If needed before a new query is issued. (Does not wait if the result set is already cached)