Class RetryUtils
- java.lang.Object
-
- org.terracotta.angela.common.util.RetryUtils
-
public class RetryUtils extends Object
-
-
Constructor Summary
Constructors Constructor Description RetryUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleanwaitFor(Callable<Boolean> condition, long maxWaitTimeMillis)static booleanwaitFor(Callable<Boolean> condition, long maxWaitDuration, TimeUnit timeUnit, Runnable failed)A general-purpose utility for source code, intended as a replacement for Awaitility.
-
-
-
Method Detail
-
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 theconditionwith a backoff between multiple poll events, until the specified duration is reached.- Parameters:
condition- the condition to evaluatemaxWaitDuration- the maximum duration to wait before giving uptimeUnit- the unit of duration- Returns:
trueif the condition was evaluated to true within the given constraints, false otherwise
-
-