Class RetryUtils


  • public class RetryUtils
    extends Object
    • Constructor Detail

      • RetryUtils

        public RetryUtils()
    • Method Detail

      • waitFor

        public static boolean waitFor​(Callable<Boolean> condition,
                                      long maxWaitTimeMillis)
      • waitFor

        public static boolean waitFor​(Callable<Boolean> condition,
                                      long maxWaitDuration,
                                      TimeUnit timeUnit,
                                      Runnable failed)
        A general-purpose utility for source code, intended as a replacement for Awaitility. Repeatedly polls the condition with a backoff between multiple poll events, until the specified duration is reached.
        Parameters:
        condition - the condition to evaluate
        maxWaitDuration - the maximum duration to wait before giving up
        timeUnit - the unit of duration
        Returns:
        true if the condition was evaluated to true within the given constraints, false otherwise