com.h3c.util.concurrent

## Class Waiter

- java.lang.Object
- - com.h3c.util.concurrent.Waiter

-     public final class Waiter
      extends Object

  A task that waits for a condition or predicate to hold. This task is asynchronous.

- - ### Method Summary

    Methods
    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`.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### wait

          public 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`.
      Parameters:
        `condition` - condition (or predicate) to evaluate
        `evaluationPeriod` - 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 `true`
        `conditionListener` - condition listener to notify every evaluation of the predicate or condition
        `threadExecutor` - thread executor used to wait asynchronously

Copyright © 2014. All Rights Reserved.