public class ThreadUtils extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
ThreadUtils.WaitCondition
Functional interface to specify a condition to wait for.
|
| Constructor and Description |
|---|
ThreadUtils() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
pollForCondition(ThreadUtils.WaitCondition condition,
long timeout,
TimeUnit timeUnit)
Waits for the specified condition to be true.
|
static boolean |
pollForCondition(ThreadUtils.WaitCondition condition,
long timeout,
TimeUnit timeUnit,
long pollIntervalMs)
Waits for the specified condition to be true.
|
public static boolean pollForCondition(ThreadUtils.WaitCondition condition, long timeout, TimeUnit timeUnit)
condition - condition to wait ontimeout - time to wait for condition to be truetimeUnit - unit of time to waitpublic static boolean pollForCondition(ThreadUtils.WaitCondition condition, long timeout, TimeUnit timeUnit, long pollIntervalMs)
condition - condition to wait ontimeout - time to wait for condition to be truetimeUnit - unit of time to waitpollIntervalMs - interval at which to poll, in millisecondsCopyright © 2016. All Rights Reserved.