public class CronExpressionIntervalSupplier extends Object implements SleepIntervalSupplier
Constructor and Description |
---|
CronExpressionIntervalSupplier(org.apache.logging.log4j.core.util.CronExpression cronExpression,
long fixedInterval)
Constructs a new
CronExpressionIntervalSupplier . |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
long |
getNextInterval(long previousTickedMs,
long nowTimeStampMillis)
Gets the next interval for sleeping.
|
long |
getRunLimit(long previousTickedMs)
Gets the run limit from previous ticked.
|
int |
hashCode() |
public CronExpressionIntervalSupplier(org.apache.logging.log4j.core.util.CronExpression cronExpression, long fixedInterval)
CronExpressionIntervalSupplier
.cronExpression
- the cron expressionfixedInterval
- the fixed intervalpublic long getNextInterval(long previousTickedMs, long nowTimeStampMillis)
SleepIntervalSupplier
getNextInterval
in interface SleepIntervalSupplier
previousTickedMs
- previous ticked time stamp in millisecondnowTimeStampMillis
- current time stamp in millisecondpublic long getRunLimit(long previousTickedMs)
SleepIntervalSupplier
getRunLimit
in interface SleepIntervalSupplier
previousTickedMs
- previous ticked time stamp in millisecondCopyright © 2023. All Rights Reserved.