Package com.illumon.iris.controller
Class IrisQuerySchedulerRange
java.lang.Object
com.illumon.iris.controller.IrisQueryScheduler
com.illumon.iris.controller.IrisQuerySchedulerRange
- All Implemented Interfaces:
IrisScheduler
Implementation of
IrisScheduler
for queries that run over ranges.-
Nested Class Summary
Nested classes/interfaces inherited from class com.illumon.iris.controller.IrisQueryScheduler
IrisQueryScheduler.RestartWhenRunning
-
Field Summary
Fields inherited from class com.illumon.iris.controller.IrisQueryScheduler
DISABLED_PARSE_STRING, overnight, RESTART_COUNT_UNLIMITED, timeZone
Fields inherited from interface com.illumon.iris.controller.IrisScheduler
DELIMITER_TOKEN, SCHEDULER_TYPE_TOKEN
-
Constructor Summary
ConstructorsConstructorDescriptionNo-arg constructor for creation from string array.IrisQuerySchedulerRange
(String startTime, String stopTime, String timeZone, boolean schedulingDisabled, boolean overnight, boolean repeatEnabled, String repeatInterval, boolean skipIfUnsuccessful, boolean stopTimeDisabled, int errorRestartCount, String restartDelayMinutes, IrisQueryScheduler.RestartWhenRunning restartWhenRunning, String startDate, String stopDate, boolean useStartDateTime, boolean useStopDateTime) Constructor called with scheduling parameters. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Indicate whether default validation should enforce the start and stop time ordering.boolean
void
generateSchedulerTimes
(Long lookPastTime, Map<Long, PersistentQueryInfo> queryInfos) Generate the next start/stop time values for this query.String[]
getScheduleDetailDisplay
(String[] strings, Map<Long, PersistentQueryInfo> queryInfos) long
Return the scheduler's next scheduled stop time.void
populateSchedulerFromStringArray
(String[] strings) boolean
Indicate whether the start time/date option is used.boolean
Indicate whether the stop time/date option is used.void
validate
(Map<Long, PersistentQueryInfo> allConfigurations) Validate the scheduling.Methods inherited from class com.illumon.iris.controller.IrisQueryScheduler
getRepeatInterval, getRestartDelayMinutes, getRestartErrorCount, getRestartWhenRunning, getRestartWhenRunningValues, getSchedulingDisabled, getStartTime, getStartTimeDisplay, getStartTimeInMillis, getStartTimeOfDay, getStopTime, getStopTimeDisplay, getStopTimeOfDay, getTimeZoneDisplay, getTimeZoneString, hasStartTime, hasStopTime, isOvernight, isRepeatEnabled, isStartTimeFirstForDay, isStopTimeDisabled, shouldRestartWhenRunning, skipIfUnsuccessful
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.illumon.iris.controller.IrisScheduler
areConditionsMet, getDependentOnQuerySerials, getExpirationTimeMillis, getRepeatInterval, getRestartDelayMinutes, getRestartErrorCount, getRunOnFailure, getSchedulingDisabled, getStartTimeDisplay, getStartTimeInMillis, getStartTimeOfDay, getStopTimeDisplay, getStopTimeOfDay, getTemporaryQueueName, getTimeZoneDisplay, getTimeZoneString, hasStopTime, isAutoDelete, isOvernight, isRepeatEnabled, isStartTimeFirstForDay, setDependentOnQuerySerials, shouldRestartWhenRunning, skipIfUnsuccessful, updateDependencyState, updateDependencyState
-
Constructor Details
-
IrisQuerySchedulerRange
public IrisQuerySchedulerRange()No-arg constructor for creation from string array. This will be called reflexively by the factory. -
IrisQuerySchedulerRange
public IrisQuerySchedulerRange(String startTime, String stopTime, String timeZone, boolean schedulingDisabled, boolean overnight, boolean repeatEnabled, String repeatInterval, boolean skipIfUnsuccessful, boolean stopTimeDisabled, int errorRestartCount, String restartDelayMinutes, IrisQueryScheduler.RestartWhenRunning restartWhenRunning, String startDate, String stopDate, boolean useStartDateTime, boolean useStopDateTime) Constructor called with scheduling parameters.- Parameters:
startTime
- the query's start timestopTime
- the query's stop timetimeZone
- the time zone for the dates and timesschedulingDisabled
- if true, scheduling is disabledovernight
- unused but required byIrisQueryScheduler
constructorrepeatEnabled
- if true, it's a repeating PQrepeatInterval
- if repeating, the intervalskipIfUnsuccessful
- unused but required byIrisQueryScheduler
constructorstopTimeDisabled
- indicates whether the stop time is used to stop the PQerrorRestartCount
- the number of times a failing PQ should be restartedrestartDelayMinutes
- the delay between restart attempts for a failing PQrestartWhenRunning
- if true, restart the PQ when its restart time arrives even if it's runningstartDate
- the query's start datestopDate
- the query's stop dateuseStartDateTime
- if true, the option to use a start date/time is selecteduseStopDateTime
- if true, the option to use a stop date/time is selected
-
-
Method Details
-
generateStringArrayFromScheduler
- Specified by:
generateStringArrayFromScheduler
in interfaceIrisScheduler
-
populateSchedulerFromStringArray
- Specified by:
populateSchedulerFromStringArray
in interfaceIrisScheduler
-
equals
- Overrides:
equals
in classIrisQueryScheduler
-
generateSchedulerTimes
Description copied from interface:IrisScheduler
Generate the next start/stop time values for this query. Generated values of -1 will be used to indicate no start or stop time. After calling this, calling getStartTimeInMillis will return the generated start time and calling getStopTimeInMillis will return the generated stop time.- Specified by:
generateSchedulerTimes
in interfaceIrisScheduler
- Parameters:
lookPastTime
- the time in millis past which the scheduling engine looks for the next start time, or null if none is desiredqueryInfos
- the controller's query information Map
-
getStopTimeInMillis
public long getStopTimeInMillis()Description copied from interface:IrisScheduler
Return the scheduler's next scheduled stop time. This must be called afterIrisScheduler.generateSchedulerTimes(Long, Map)
. A value of -1 means there is no stop time.- Specified by:
getStopTimeInMillis
in interfaceIrisScheduler
- Overrides:
getStopTimeInMillis
in classIrisQueryScheduler
- Returns:
- the query's next start time in millis
-
getScheduleDetailDisplay
- Specified by:
getScheduleDetailDisplay
in interfaceIrisScheduler
-
validate
Description copied from interface:IrisScheduler
Validate the scheduling.- Specified by:
validate
in interfaceIrisScheduler
- Overrides:
validate
in classIrisQueryScheduler
- Parameters:
allConfigurations
- a map of all current query configurations which can be used for additional validation
-
getStartDateString
-
getStopDateString
-
useStartDateTime
public boolean useStartDateTime()Indicate whether the start time/date option is used.- Returns:
- true if the start date/time option is selected
-
useStopDateTime
public boolean useStopDateTime()Indicate whether the stop time/date option is used.- Returns:
- true if the stop date/time option is selected
-
enforceStartStopTimeOrder
public boolean enforceStartStopTimeOrder()Description copied from interface:IrisScheduler
Indicate whether default validation should enforce the start and stop time ordering. If this is false (for example when it's a multi-day scheduler), the scheduler implementation should enforce start and stop ordering in itsIrisScheduler.validate(java.util.Map<java.lang.Long, com.illumon.iris.controller.PersistentQueryInfo>)
implementation.- Specified by:
enforceStartStopTimeOrder
in interfaceIrisScheduler
- Overrides:
enforceStartStopTimeOrder
in classIrisQueryScheduler
- Returns:
- true if default validation should enforce the start and stop time ordering
-