public class ThreadSleeper
extends java.lang.Object
| Constructor and Description |
|---|
ThreadSleeper(long totalMaxTimeWaitingMillis,
java.util.function.Function<java.lang.String,java.lang.RuntimeException> exceptionThrower) |
| Modifier and Type | Method and Description |
|---|---|
void |
checkThresholdAndWait(long maxTimeToWait)
It checks if the threshold hasn't been reached.
|
public ThreadSleeper(long totalMaxTimeWaitingMillis,
java.util.function.Function<java.lang.String,java.lang.RuntimeException> exceptionThrower)
public void checkThresholdAndWait(long maxTimeToWait)
maxTimeToWait - Max time allowed to wait in this iteration.