public class Wait extends Object
Wait.waitFor(() -> messageService.getMessageCount() == 1);
Modifier and Type | Class and Description |
---|---|
static interface |
Wait.Condition |
Constructor and Description |
---|
Wait() |
Modifier and Type | Method and Description |
---|---|
static boolean |
waitFor(long durationMillis,
long sleepMillis,
Wait.Condition condition)
Same as
waitFor(long, Condition) . |
static boolean |
waitFor(long durationMillis,
Wait.Condition condition)
Waits for a condition to be satisfied or till
durationMillis , whichever is sooner. |
static boolean |
waitFor(Wait.Condition condition)
Same as
waitFor(long, long, Condition) |
public static boolean waitFor(Wait.Condition condition)
waitFor(long, long, Condition)
condition
- condition to check from time to time;public static boolean waitFor(long durationMillis, Wait.Condition condition)
durationMillis
, whichever is sooner.durationMillis
- max time to wait in millis.condition
- condition to check from time to time;public static boolean waitFor(long durationMillis, long sleepMillis, Wait.Condition condition)
waitFor(long, Condition)
.sleepMillis
- time to sleep between checks.durationMillis
- max time to wait in millis.condition
- condition to check from time to time;Copyright © 2020 JavaLite. All rights reserved.