Class IrisQuerySchedulerTemporary

java.lang.Object
com.illumon.iris.controller.IrisQueryScheduler
com.illumon.iris.controller.IrisQuerySchedulerTemporary
All Implemented Interfaces:
IrisScheduler

public class IrisQuerySchedulerTemporary extends IrisQueryScheduler implements IrisScheduler
  • Field Details

  • 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

    • generateInteractiveConsoleTemporarySchedule

      public static String[] generateInteractiveConsoleTemporarySchedule(boolean autoDelete)
    • generateStringArrayFromScheduler

      public String[] generateStringArrayFromScheduler()
      Specified by:
      generateStringArrayFromScheduler in interface IrisScheduler
    • populateSchedulerFromStringArray

      public void populateSchedulerFromStringArray(String[] strings)
      Specified by:
      populateSchedulerFromStringArray in interface IrisScheduler
    • equals

      public boolean equals(Object object)
      Overrides:
      equals in class IrisQueryScheduler
    • getScheduleDetailDisplay

      public String getScheduleDetailDisplay(String[] strings, Map<Long,PersistentQueryInfo> queryInfos)
      Specified by:
      getScheduleDetailDisplay in interface IrisScheduler
    • generateSchedulerTimes

      public void generateSchedulerTimes(Long lookPastTime, Map<Long,PersistentQueryInfo> queryInfos)
      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 interface IrisScheduler
      Parameters:
      lookPastTime - the time in millis past which the scheduling engine looks for the next start time, or null if none is desired
      queryInfos - the controller's query information Map
    • updateDependencyState

      public boolean updateDependencyState(Long serial, PersistentQueryState.Status status)
      Description copied from interface: IrisScheduler
      For a dependent query, update the dependency state with the passed in state, and indicate if all required dependencies have been met.
      Specified by:
      updateDependencyState in interface IrisScheduler
      Parameters:
      serial - the serial of the dependency query
      status - 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: IrisScheduler
      Check if the dependency conditions for running have been met.
      Specified by:
      areConditionsMet in interface IrisScheduler
      Returns:
      true if the query has met it dependency conditions
    • getTemporaryQueueName

      public String getTemporaryQueueName()
      Description copied from interface: IrisScheduler
      For a temporary query, return the temporary queue name.
      Specified by:
      getTemporaryQueueName in interface IrisScheduler
      Returns:
      the queue name, or null if it is not a temporary query
    • getExpirationTimeMillis

      public long getExpirationTimeMillis()
      Description copied from interface: IrisScheduler
      For a temporary query, return the query's expiration time in millis.
      Specified by:
      getExpirationTimeMillis in interface IrisScheduler
      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: IrisScheduler
      For a temporary query, identify if we should auto-delete on completion
      Specified by:
      isAutoDelete in interface IrisScheduler
      Returns:
      if the query should auto-delete on completion
    • validate

      public void validate(Map<Long,PersistentQueryInfo> allConfigurations)
      Description copied from interface: IrisScheduler
      Validate the scheduling.
      Specified by:
      validate in interface IrisScheduler
      Overrides:
      validate in class IrisQueryScheduler
      Parameters:
      allConfigurations - a map of all current query configurations which can be used for additional validation
    • getDependentOnQuerySerials

      @Nullable public List<Long> getDependentOnQuerySerials()
      Description copied from interface: IrisScheduler
      Return the list of query serials on which this query is dependent.
      Specified by:
      getDependentOnQuerySerials in interface IrisScheduler
      Returns:
      the dependent-on query serial list, or null if this is not a dependent query
    • hasStartTime

      public boolean hasStartTime()
      Description copied from class: IrisQueryScheduler
      Return true if the scheduling has a determinable start time.
      Overrides:
      hasStartTime in class IrisQueryScheduler
      Returns:
      true if the scheduling has a determinable start time, false otherwise
    • shouldRestartWhenRunning

      public boolean shouldRestartWhenRunning()
      Description copied from interface: IrisScheduler
      Indicates 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:
      shouldRestartWhenRunning in interface IrisScheduler
      Overrides:
      shouldRestartWhenRunning in class IrisQueryScheduler
      Returns:
      true if the query should be restarted when its dependent-on condition is met
    • getTerminationDelay

      public static Long getTerminationDelay(PersistentQueryConfiguration config)
      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