public final class Waiter extends Object
| Modifier and Type | Method and Description |
|---|---|
static void |
wait(Predicate<Void> condition,
javax.measure.Measurable<javax.measure.quantity.Duration> evaluationPeriod,
Integer maxEvaluations,
Listener<Boolean> conditionListener,
ThreadExecutor threadExecutor)
Waits until the predicate or condition becomes
true. |
public static void wait(Predicate<Void> condition, javax.measure.Measurable<javax.measure.quantity.Duration> evaluationPeriod, Integer maxEvaluations, Listener<Boolean> conditionListener, ThreadExecutor threadExecutor)
true.condition - condition (or predicate) to evaluateevaluationPeriod - period between evaluations (time the thread will be in sleep mode
until a new evaluation is performed)maxEvaluations - maximum number of evaluations, null to evaluate until the
predicate or condition becomes trueconditionListener - condition listener to notify every evaluation of the predicate or
conditionthreadExecutor - thread executor used to wait asynchronouslyCopyright © 2014. All Rights Reserved.