Interface WaitForConditionWaitStrategy<T>
- Type Parameters:
T- the type of state being polled
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Strategy that computes the delay before the next polling attempt in a
waitForCondition operation.
Implementations evaluate the current state and attempt number to compute a Duration delay. The
continue/stop decision is handled separately by WaitForConditionResult. When the maximum number of attempts
is exceeded, the strategy should throw a WaitForConditionFailedException.
- See Also:
-
Method Summary
-
Method Details
-
evaluate
Computes the delay before the next polling attempt based on the current state and attempt number.- Parameters:
state- the current state returned by the check functionattempt- the attempt number (1-based)- Returns:
- a
Durationrepresenting the delay before the next polling attempt - Throws:
WaitForConditionFailedException- if the maximum number of attempts has been exceeded
-