Package org.awaitility.pollinterval
Class FixedPollInterval
java.lang.Object
org.awaitility.pollinterval.FixedPollInterval
- All Implemented Interfaces:
PollInterval
Generates a fixed (linear) poll interval based on the supplied duration
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionFixedPollInterval(long pollInterval, TimeUnit unit) Create a new instance of theFixedPollInterval.FixedPollInterval(Duration duration) Create a new instance of theFixedPollInterval. -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic FixedPollIntervalSyntactic sugar for create a new instance ofFixedPollInterval.static FixedPollIntervalSyntactic sugar for create a new instance ofFixedPollInterval.inthashCode()Generate the next durationtoString()
-
Field Details
-
duration
-
-
Constructor Details
-
FixedPollInterval
Create a new instance of theFixedPollInterval.- Parameters:
duration- The duration of the poll interval
-
FixedPollInterval
Create a new instance of theFixedPollInterval.- Parameters:
pollInterval- The poll interval amountunit- The time unit
-
-
Method Details
-
next
Generate the next duration- Specified by:
nextin interfacePollInterval- Parameters:
pollCount- The number of times the condition has been polled (evaluated)previousDuration- The duration of the previously returned poll interval- Returns:
- Always return the duration that was supplied to this instance of
FixedPollInterval
-
fixed
Syntactic sugar for create a new instance ofFixedPollInterval.- Parameters:
duration- The duration of the poll interval- Returns:
- A new instance of
FixedPollInterval
-
fixed
Syntactic sugar for create a new instance ofFixedPollInterval.- Parameters:
pollInterval- The poll interval amountunit- The chrono unit- Returns:
- A new instance of
FixedPollInterval
-
equals
-
hashCode
public int hashCode() -
toString
-