public abstract class Unreliables extends Object
| Constructor and Description |
|---|
Unreliables() |
| Modifier and Type | Method and Description |
|---|---|
static <T> T |
retryUntilSuccess(int tryLimit,
@NotNull Callable<T> lambda)
Call a supplier repeatedly until it returns a result.
|
static <T> T |
retryUntilSuccess(int timeout,
@NotNull TimeUnit timeUnit,
@NotNull Callable<T> lambda)
Call a supplier repeatedly until it returns a result.
|
static void |
retryUntilTrue(int tryLimit,
@NotNull Callable<Boolean> lambda)
Call a callable repeatedly until it returns true.
|
static void |
retryUntilTrue(int timeout,
@NotNull TimeUnit timeUnit,
@NotNull Callable<Boolean> lambda)
Call a callable repeatedly until it returns true.
|
public static <T> T retryUntilSuccess(int timeout,
@NotNull
@NotNull TimeUnit timeUnit,
@NotNull
@NotNull Callable<T> lambda)
T - return type of the suppliertimeout - how long to waittimeUnit - time unit for time intervallambda - supplier lambda expression (may throw checked exceptions)public static <T> T retryUntilSuccess(int tryLimit,
@NotNull
@NotNull Callable<T> lambda)
T - return type of the suppliertryLimit - how many times to try calling the supplierlambda - supplier lambda expression (may throw checked exceptions)public static void retryUntilTrue(int timeout,
@NotNull
@NotNull TimeUnit timeUnit,
@NotNull
@NotNull Callable<Boolean> lambda)
timeout - how long to waittimeUnit - time unit for time intervallambda - supplier lambda expressionpublic static void retryUntilTrue(int tryLimit,
@NotNull
@NotNull Callable<Boolean> lambda)
tryLimit - how many times to try calling the supplierlambda - supplier lambda expressionCopyright © 2019. All rights reserved.