Package com.google.gerrit.server.config
Class ScheduleConfig.Schedule
java.lang.Object
com.google.gerrit.server.config.ScheduleConfig.Schedule
- Enclosing class:
ScheduleConfig
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Optional
<ScheduleConfig.Schedule> Creates a schedule.static ScheduleConfig.Schedule
createOrFail
(long interval, String startTime) Creates a schedule.abstract long
Milliseconds between constructor invocation and first event time.abstract long
interval()
Number of milliseconds between events.
-
Constructor Details
-
Schedule
public Schedule()
-
-
Method Details
-
interval
public abstract long interval()Number of milliseconds between events. -
initialDelay
public abstract long initialDelay()Milliseconds between constructor invocation and first event time.If there is any lag between the constructor invocation and queuing the object into an executor the event will run later, as there is no method to adjust for the scheduling delay.
-
createOrFail
Creates a schedule.ScheduleConfig
defines details about which values are valid for theinterval
andstartTime
parameters.- Parameters:
interval
- the interval in millisecondsstartTime
- the start time as "<day of week> <hours>:<minutes>
" or "<hours>:<minutes>
"- Returns:
- the schedule
- Throws:
IllegalArgumentException
- if any of the parameters is invalid
-
create
Creates a schedule.ScheduleConfig
defines details about which values are valid for theinterval
andstartTime
parameters.- Parameters:
interval
- the interval in millisecondsstartTime
- the start time as "<day of week> <hours>:<minutes>
" or "<hours>:<minutes>
"- Returns:
- the schedule or
Optional.empty()
if any of the parameters is invalid
-