code: public void onFailure() throws InterruptedException {
          int val = currentFailureCount.incrementAndGet();
          if (val > 50) {
              currentFailureCount.compareAndSet(val, MAX_FAILURE_COUNT);
              val = MAX_FAILURE_COUNT;
          }
  
          int delay = MIN_DELAY + ((MAX_DELAY - MIN_DELAY) / MAX_FAILURE_COUNT) * val;
  
          synchronized (this) {
              Logger.d(TAG, "onFailure: wait " + delay + " ms");
              wait(delay);
          }
      }
docs: Called on failure, wait required time before exiting method
  
  @throws InterruptedException if waiting was interrupted