| Modifier and Type | Method and Description |
|---|---|
Waiters.WaiterBuilder<T> |
checkIntervalMs(long checkIntervalMs)
Specify the interval between checks
|
Waiters.WaiterBuilder<T> |
maxTimeToWaitMs(long maxTimeToWaitMs)
Specify the maximum amount of time to wait for the condition to be met
|
Waiters.WaiterBuilder<T> |
message(String message)
Specify a static message for the exception
|
Waiters.WaiterBuilder<T> |
messageGenerator(Function<T,String> messageGenerator)
Supply a function for generating the exception message
|
void |
run()
Wait for the condition to be true, throw an
Waiters.ConditionNotMetException if the condition is not met in time |
public void run()
Waiters.ConditionNotMetException if the condition is not met in timepublic Waiters.WaiterBuilder<T> message(String message)
message - the messagepublic Waiters.WaiterBuilder<T> messageGenerator(Function<T,String> messageGenerator)
messageGenerator - a function that takes the last value as a parameterpublic Waiters.WaiterBuilder<T> maxTimeToWaitMs(long maxTimeToWaitMs)
maxTimeToWaitMs - the maximum time in millisecondspublic Waiters.WaiterBuilder<T> checkIntervalMs(long checkIntervalMs)
checkIntervalMs - the interval between checks in millisecondsCopyright © 2023. All rights reserved.