public static <T> T tryFor(long timeout, TimeUnit timeoutUnit,
      long interval, TimeUnit intervalUnit,
      Supplier<T> supplier,
      Predicate<T> predicate) throws TimeoutException, InterruptedException {
    return tryFor(timeout, timeoutUnit, interval, intervalUnit, supplier, predicate, steadyClock);
  }
Try the supplier function until the predicate is true or timeout occurs.

@param timeout to retry for
@param timeoutUnit the unit for timeout
@param interval time between each try
@param intervalUnit the unit for interval
@param supplier to execute until predicate is true or times out
@param predicate to test for retry
@param <T> type of return value
@return value from supplier after it passes predicate or times out.
geode-common/src/main/java/org/apache/geode/internal/utils/Retry.java