public class ScheduleInterval extends Object
ScheduleData
.Constructor and Description |
---|
ScheduleInterval() |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
IntervalUnit |
getUnit()
Get the interval time unit.
|
int |
getValue()
Get the interval duration.
|
boolean |
isDue(int startTimestamp,
int lastTimestamp,
int timestamp,
java.time.ZoneId zone)
Check if this interval is due for execution.
|
boolean |
isValid()
Whether this interval definition is valid.
|
ScheduleInterval |
setUnit(IntervalUnit unit)
Set the interval time unit.
|
ScheduleInterval |
setValue(int value)
Set the interval duration.
|
String |
toString() |
public int getValue()
public ScheduleInterval setValue(int value)
value
- The interval duration.public IntervalUnit getUnit()
public ScheduleInterval setUnit(IntervalUnit unit)
unit
- The interval time unit.public boolean isValid()
A valid interval has a value
greater than zero, and has a
non-null unit
set.
public boolean isDue(int startTimestamp, int lastTimestamp, int timestamp, java.time.ZoneId zone)
startTimestamp
- start timestamp of the schedulelastTimestamp
- The timestamp of the last execution.timestamp
- The current timestamp.zone
- time-zoneCopyright © 2024 Gentics Software. All rights reserved.