Package com.illumon.iris.controller
Class IrisQuerySchedulerTemporary
java.lang.Object
com.illumon.iris.controller.IrisQueryScheduler
com.illumon.iris.controller.IrisQuerySchedulerTemporary
- All Implemented Interfaces:
IrisScheduler
-
Nested Class Summary
Nested classes/interfaces inherited from class com.illumon.iris.controller.IrisQueryScheduler
IrisQueryScheduler.RestartWhenRunning -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringFields inherited from class com.illumon.iris.controller.IrisQueryScheduler
DISABLED_PARSE_STRING, overnight, RESTART_COUNT_UNLIMITED, timeZoneFields inherited from interface com.illumon.iris.controller.IrisScheduler
DELIMITER_TOKEN, SCHEDULER_TYPE_TOKEN -
Constructor Summary
ConstructorsConstructorDescriptionIrisQuerySchedulerTemporary(String startTime, String stopTime, String timeZone, boolean schedulingDisabled, boolean repeatEnabled, String repeatInterval, boolean skipIfUnsuccessful, boolean stopTimeDisabled, int errorRestartCount, String temporaryQueueName, long expirationTimeMillis, List<Long> dependentOnQuerySerials, String restartDelayMinutes, IrisQueryScheduler.RestartWhenRunning restartWhenRunning) IrisQuerySchedulerTemporary(String startTime, String stopTime, String timeZone, boolean schedulingDisabled, boolean repeatEnabled, String repeatInterval, boolean skipIfUnsuccessful, boolean stopTimeDisabled, int errorRestartCount, String temporaryQueueName, long expirationTimeMillis, List<Long> dependentOnQuerySerials, String restartDelayMinutes, IrisQueryScheduler.RestartWhenRunning restartWhenRunning, boolean autoDelete) -
Method Summary
Modifier and TypeMethodDescriptionbooleanCheck if the dependency conditions for running have been met.copy()Copy this objectbooleanstatic String[]generateInteractiveConsoleTemporarySchedule(boolean autoDelete) voidgenerateSchedulerTimes(Long lookPastTime, Map<Long, PersistentQueryInfo> queryInfos) Generate the next start/stop time values for this query.String[]Return the list of query serials on which this query is dependent.longFor a temporary query, return the query's expiration time in millis.getScheduleDetailDisplay(String[] strings, Map<Long, PersistentQueryInfo> queryInfos) For a temporary query, return the temporary queue name.static LongIdentifies the termination-delay from type-specific field, if available.booleanReturn true if the scheduling has a determinable start time.booleanFor a temporary query, identify if we should auto-delete on completionstatic booleanisConsoleQueue(String queryName) voidpopulateSchedulerFromStringArray(String[] strings) booleanIndicates whether a query should be restarted by the scheduler when running.booleanupdateDependencyState(Long serial, PersistentQueryState.Status status) For a dependent query, update the dependency state with the passed in state, and indicate if all required dependencies have been met.voidvalidate(Map<Long, PersistentQueryInfo> allConfigurations) Validate the scheduling.Methods inherited from class com.illumon.iris.controller.IrisQueryScheduler
copyBaseFieldsFrom, enforceStartStopTimeOrder, getRepeatInterval, getRestartDelayMinutes, getRestartErrorCount, getRestartWhenRunning, getRestartWhenRunningValues, getSchedulingDisabled, getStartTime, getStartTimeDisplay, getStartTimeInMillis, getStartTimeOfDay, getStopTime, getStopTimeDisplay, getStopTimeInMillis, getStopTimeOfDay, getTimeZoneDisplay, getTimeZoneString, hasStopTime, isOvernight, isRepeatEnabled, isStartTimeFirstForDay, isStopTimeDisabled, skipIfUnsuccessfulMethods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.illumon.iris.controller.IrisScheduler
enforceStartStopTimeOrder, getRepeatInterval, getRestartDelayMinutes, getRestartErrorCount, getRunOnFailure, getSchedulingDisabled, getStartTimeDisplay, getStartTimeInMillis, getStartTimeOfDay, getStopTimeDisplay, getStopTimeInMillis, getStopTimeOfDay, getTimeZoneDisplay, getTimeZoneString, hasStopTime, isOvernight, isRepeatEnabled, isStartTimeFirstForDay, setDependentOnQuerySerials, skipIfUnsuccessful, updateDependencyState
-
Field Details
-
TEMPORARY_QUEUE_NAME_STRING
- See Also:
-
TEMPORARY_EXPIRATION_TIME_MILLIS_STRING
- See Also:
-
TEMPORARY_DEPENDENT_QUERY_SERIAL_STRING
- See Also:
-
TEMPORARY_AUTO_DELETE
- See Also:
-
INTERACTIVE_CONSOLE_TEMPORARY_QUEUE_NAME
- See Also:
-
TERMINATION_DELAY_PROPERTY
- See Also:
-
-
Constructor Details
-
IrisQuerySchedulerTemporary
public IrisQuerySchedulerTemporary() -
IrisQuerySchedulerTemporary
public IrisQuerySchedulerTemporary(String startTime, String stopTime, String timeZone, boolean schedulingDisabled, boolean repeatEnabled, String repeatInterval, boolean skipIfUnsuccessful, boolean stopTimeDisabled, int errorRestartCount, String temporaryQueueName, long expirationTimeMillis, List<Long> dependentOnQuerySerials, String restartDelayMinutes, IrisQueryScheduler.RestartWhenRunning restartWhenRunning, boolean autoDelete) -
IrisQuerySchedulerTemporary
public IrisQuerySchedulerTemporary(String startTime, String stopTime, String timeZone, boolean schedulingDisabled, boolean repeatEnabled, String repeatInterval, boolean skipIfUnsuccessful, boolean stopTimeDisabled, int errorRestartCount, String temporaryQueueName, long expirationTimeMillis, List<Long> dependentOnQuerySerials, String restartDelayMinutes, IrisQueryScheduler.RestartWhenRunning restartWhenRunning)
-
-
Method Details
-
isConsoleQueue
-
generateInteractiveConsoleTemporarySchedule
-
generateStringArrayFromScheduler
- Specified by:
generateStringArrayFromSchedulerin interfaceIrisScheduler
-
populateSchedulerFromStringArray
- Specified by:
populateSchedulerFromStringArrayin interfaceIrisScheduler
-
equals
- Overrides:
equalsin classIrisQueryScheduler
-
copy
Description copied from interface:IrisSchedulerCopy this object- Specified by:
copyin interfaceIrisScheduler- Returns:
- a new object with exactly the same scheduler definition as this one
-
getScheduleDetailDisplay
- Specified by:
getScheduleDetailDisplayin interfaceIrisScheduler
-
generateSchedulerTimes
Description copied from interface:IrisSchedulerGenerate 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:
generateSchedulerTimesin 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
-
updateDependencyState
Description copied from interface:IrisSchedulerFor a dependent query, update the dependency state with the passed in state, and indicate if all required dependencies have been met.- Specified by:
updateDependencyStatein interfaceIrisScheduler- Parameters:
serial- the serial of the dependency querystatus- the status of the dependency query- Returns:
- true if all required dependency conditions are met for this query
-
areConditionsMet
public boolean areConditionsMet()Description copied from interface:IrisSchedulerCheck if the dependency conditions for running have been met.- Specified by:
areConditionsMetin interfaceIrisScheduler- Returns:
- true if the query has met it dependency conditions
-
getTemporaryQueueName
Description copied from interface:IrisSchedulerFor a temporary query, return the temporary queue name.- Specified by:
getTemporaryQueueNamein interfaceIrisScheduler- Returns:
- the queue name, or null if it is not a temporary query
-
getExpirationTimeMillis
public long getExpirationTimeMillis()Description copied from interface:IrisSchedulerFor a temporary query, return the query's expiration time in millis.- Specified by:
getExpirationTimeMillisin interfaceIrisScheduler- Returns:
- the query's expiration time in millis (i.e. the time from which it completes until it should be deleted)
-
isAutoDelete
public boolean isAutoDelete()Description copied from interface:IrisSchedulerFor a temporary query, identify if we should auto-delete on completion- Specified by:
isAutoDeletein interfaceIrisScheduler- Returns:
- if the query should auto-delete on completion
-
validate
Description copied from interface:IrisSchedulerValidate the scheduling.- Specified by:
validatein interfaceIrisScheduler- Overrides:
validatein classIrisQueryScheduler- Parameters:
allConfigurations- a map of all current query configurations which can be used for additional validation
-
getDependentOnQuerySerials
Description copied from interface:IrisSchedulerReturn the list of query serials on which this query is dependent.- Specified by:
getDependentOnQuerySerialsin interfaceIrisScheduler- Returns:
- the dependent-on query serial list, or null if this is not a dependent query
-
hasStartTime
public boolean hasStartTime()Description copied from class:IrisQuerySchedulerReturn true if the scheduling has a determinable start time.- Overrides:
hasStartTimein classIrisQueryScheduler- Returns:
- true if the scheduling has a determinable start time, false otherwise
-
shouldRestartWhenRunning
public boolean shouldRestartWhenRunning()Description copied from interface:IrisSchedulerIndicates whether a query should be restarted by the scheduler when running.- For a dependent query, indicates whether the query should start immediately if the dependency condition is true and the query is not in a terminal state
- For a continually scheduled query, it indicates that a scheduled restart should cause the running query to be stopped (always true)
- For daily and monthly scheduled queries, it indicates whether a query that's scheduled to start at a specified time should be restarted, even if it's already running (e.g. started manually out of scheduled run-time)
- Specified by:
shouldRestartWhenRunningin interfaceIrisScheduler- Overrides:
shouldRestartWhenRunningin classIrisQueryScheduler- Returns:
- true if the query should be restarted when its dependent-on condition is met
-
getTerminationDelay
Identifies the termination-delay from type-specific field, if available.- Parameters:
config- the PersistentQueryConfiguration which may have a TERMINATION_DELAY_PROPERTY defined- Returns:
- the terminationDelay if set, else NULL
-