Package org.awaitility.pollinterval
Interface PollInterval
-
- All Known Implementing Classes:
FibonacciPollInterval,FixedPollInterval,IterativePollInterval
public interface PollIntervalA poll interval represents how often Awaitility will pause before reevaluating the supplied condition. Note that the name "poll interval" is a bit misleading. It's actually a delay between two successive condition evaluations. I.e if the condition evaluation takes 5 ms and a fixed poll interval of 100 ms is used then the next condition evaluation will happen at (approximately) 105 ms. It's called PollInterval for historic reasons.- Since:
- 1.7.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.time.Durationnext(int pollCount, java.time.Duration previousDuration)Generate the next poll interval (Duration) based on the previousDurationand/or thepoll count.
-
-
-
Method Detail
-
next
java.time.Duration next(int pollCount, java.time.Duration previousDuration)Generate the next poll interval (Duration) based on the previousDurationand/or thepoll count. The first time the poll interval is called the poll delay is used aspreviousDuration. By default the poll delay is equal toDuration.ZERO.- Parameters:
pollCount- The number of times the condition has been polled (evaluated). Always a positive integer.previousDuration- The duration of the previously returned poll interval.- Returns:
- The duration of the next poll interval
-
-