public class Inconsistents extends Object
| Constructor and Description |
|---|
Inconsistents() |
| Modifier and Type | Method and Description |
|---|---|
static <T> T |
retryUntilConsistent(int consistentTime,
int totalTimeout,
@NotNull TimeUnit timeUnit,
@NotNull Callable<T> lambda)
Retry invocation of a supplier repeatedly until it returns a consistent result for a sufficient time period.
|
public static <T> T retryUntilConsistent(int consistentTime,
int totalTimeout,
@NotNull
@NotNull TimeUnit timeUnit,
@NotNull
@NotNull Callable<T> lambda)
T - the return type of the UnreliableSupplierconsistentTime - how long the result should be consistent for before it is returnedtotalTimeout - how long in total to wait for stabilisation to occurtimeUnit - time unit for time intervalslambda - an UnreliableSupplier which should be calledCopyright © 2019. All rights reserved.