public class FixedPollInterval extends Object implements PollInterval
| Constructor and Description |
|---|
FixedPollInterval(Duration duration)
Create a new instance of the
FixedPollInterval. |
FixedPollInterval(long pollInterval,
TimeUnit unit)
Create a new instance of the
FixedPollInterval. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
static FixedPollInterval |
fixed(Duration duration)
Syntactic sugar for create a new instance of
FixedPollInterval. |
static FixedPollInterval |
fixed(long pollInterval,
TimeUnit unit)
Syntactic sugar for create a new instance of
FixedPollInterval. |
int |
hashCode() |
Duration |
next(int pollCount,
Duration previousDuration)
Generate the next duration
|
String |
toString() |
public FixedPollInterval(Duration duration)
FixedPollInterval.duration - The duration of the poll intervalpublic FixedPollInterval(long pollInterval,
TimeUnit unit)
FixedPollInterval.pollInterval - The poll interval amountunit - The time unitpublic Duration next(int pollCount, Duration previousDuration)
next in interface PollIntervalpollCount - The number of times the condition has been polled (evaluated)previousDuration - The duration of the previously returned poll intervalFixedPollIntervalpublic static FixedPollInterval fixed(Duration duration)
FixedPollInterval.duration - The duration of the poll intervalFixedPollIntervalpublic static FixedPollInterval fixed(long pollInterval, TimeUnit unit)
FixedPollInterval.pollInterval - The poll interval amountunit - The chrono unitFixedPollIntervalCopyright © 2010–2022. All rights reserved.