Package com.redwood.scheduler.api.model
Interface ForecastJob
- 
- All Superinterfaces:
- BusinessKeyObject,- ForecastJobComp,- Readable,- SchedulerEntity,- SchedulerEntityComp
 
 public interface ForecastJob extends ForecastJobComp, SchedulerEntity, BusinessKeyObject, Readable Data for the forecast of a job. Created for existing jobs and on demand for job groups for specific dates.
- 
- 
Field SummaryFields Modifier and Type Field Description static LongDEFAULT_RUNTIMEDefault runtime in milliseconds for to forecast jobs that have no statistics.static LongFREQUENCY_PERIOD_LENGTHLength of the period for which we create one frequency forecast job.static StringOBJECT_TYPEString that will be returned fromSchedulerEntity.getObjectType()for "ForecastJob" objects.static QueryObjectType<ForecastJob>TYPEType that can be used inSchedulerSession.executeObjectQuery(QueryObjectType, String, Object...).- 
Fields inherited from interface com.redwood.scheduler.api.model.SchedulerEntityACTION_AUDIT, ACTION_EXPORT, ACTION_READ, BEHAVIOR_DEPRECATED, BEHAVIOR_NONE, BEHAVIOR_SYSTEM
 
- 
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description RWIterable<ForecastJob>forecast(JobForecastContext forecastContext)Create forecast jobs based on the current forecast job.voidforecastJob(JobForecastContext forecastContext)Fill this forecast job with a forecast for the job that is set in the job attribute.RWIterable<ForecastJob>getChildForecastJobs()Get anRWIterableover a collection ofChildForecastJobs, the collection will be ordered by ChildOrder.LonggetChildOrder()Get the value for ChildOrder.StringgetDescription()Get the value for Description.StringgetErrorDescription()Get the value for ErrorDescription.JobEstimatesgetEstimates()Get the value for Estimates.DateTimeZonegetExpectedEndTime()Get the value for ExpectedEndTime.LonggetExpectedRunTime()Get the value for ExpectedRunTime.DateTimeZonegetExpectedStartTime()Get the value for ExpectedStartTime.ForecastJobStatusgetForecastStatus()Get the value for ForecastStatus.LonggetFrequency()Get the value for Frequency.JobgetJob()Get the Job.JobChainCallgetJobChainCall()Get the JobChainCall.JobChainStepgetJobChainStep()Get the JobChainStep.JobDefinitiongetJobDefinition()Get the JobDefinition.DateTimeZonegetJobGroupEndDate()Get the value for JobGroupEndDate.LonggetJobGroupId()Get the value for JobGroupId.LonggetJobGroupMaxJobs()Get the value for JobGroupMaxJobs.LonggetJobGroupPresubmitCount()Get the value for JobGroupPresubmitCount.RWIterable<JobDefinitionJobLock>getJobLocks()Return the JobLocks for this forecast job.JobStatusgetJobStatus()Get the value for JobStatus.JobMaintenancegetMaintenance()Get the value for Maintenance.DateTimeZonegetNextSubmitBaseTime()Get the value for NextSubmitBaseTime.LonggetNumChildForecastJobs()Get the value for NumChildForecastJobs.ForecastJobgetParentForecastJob()Get the ParentForecastJob.LonggetPriority()Get the value for Priority.QueuegetQueue()Get the Queue.RWIterable<JobDefinitionRaiseEvent>getRaiseEvents()Return the event definitions that are forecasted to be raised.StringgetRecurrencePattern()Get the value for RecurrencePattern.LonggetReturnCode()Get the value for ReturnCode.StringgetSearchDescription()Get the value for SearchDescription.StringgetStartAtValue()Get the value for StartAtValue.DateTimeZonegetStartTime()Get the value for StartTime.LonggetStepIteration()Get the value for StepIteration.SubmitFramegetSubmitFrame()Get the SubmitFrame.TimeWindowgetTimeWindow()Get the TimeWindow.RWIterable<JobDefinitionWaitEvent>getWaitEvents()Return the event definitions that are forecasted to be waited for.voidsetDescription(String newDescription)Set the value for Description.voidsetExpectedRunTime(Long newExpectedRunTime)Set the value for ExpectedRunTime.voidsetFrequency(Long newFrequency)Set the value for Frequency.voidsetJob(Job newJob)Set the value for Job.voidsetJobChainCall(JobChainCall newJobChainCall)Set the value for JobChainCall.voidsetJobChainStep(JobChainStep newJobChainStep)Set the value for JobChainStep.voidsetJobDefinition(JobDefinition newJobDefinition)Set the value for JobDefinition.voidsetJobGroupId(Long newJobGroupId)Set the value for JobGroupId.voidsetParentForecastJob(ForecastJob newParentForecastJob)Set the value for ParentForecastJob.voidsetQueue(Queue newQueue)Set the value for Queue.voidsetStartTime(DateTimeZone newStartTime)Set the value for StartTime.voidsetSubmitFrame(SubmitFrame newSubmitFrame)Set the value for SubmitFrame.voidsetTimeWindow(TimeWindow newTimeWindow)Set the value for TimeWindow.- 
Methods inherited from interface com.redwood.scheduler.api.model.BusinessKeyObjectgetBusinessKey
 - 
Methods inherited from interface com.redwood.scheduler.api.model.SchedulerEntitycanPerform, createSubjectObjectPrivilegeGrant, deleteObject, getAuditTrail, getAuditTrailSize, getBehavior, getEffectiveBehavior, getErrorNameEN, getErrorNameKey, getLLPVersion, getLOV, getLOVSupport, getObjectType, getParentSchedulerEntities, getRuntime, getSubjectObjectPrivilegeGrantBySubject, getSubjectObjectPrivilegeGrants, getUniqueId, getUrl, getUrl, isCreated, isDeletable, isDeleted, isModifiable, isModified, isSelectVersioned, processRelatedObjects, processRelatedObjects, processRelatedObjects, refreshObject, resetObject, resetObject, resetValuesToDefault, selectForRead
 
- 
 
- 
- 
- 
Field Detail- 
OBJECT_TYPEstatic final String OBJECT_TYPE String that will be returned fromSchedulerEntity.getObjectType()for "ForecastJob" objects.- See Also:
- Constant Field Values
 
 - 
TYPEstatic final QueryObjectType<ForecastJob> TYPE Type that can be used inSchedulerSession.executeObjectQuery(QueryObjectType, String, Object...).
 - 
DEFAULT_RUNTIMEstatic final Long DEFAULT_RUNTIME Default runtime in milliseconds for to forecast jobs that have no statistics.
 - 
FREQUENCY_PERIOD_LENGTHstatic final Long FREQUENCY_PERIOD_LENGTH Length of the period for which we create one frequency forecast job. Value in milliseconds. Current value is 5 minutes.
 
- 
 - 
Method Detail- 
getChildOrderLong getChildOrder() Get the value for ChildOrder. (The index number of this child with respect to its siblings and its parent) This value is mandatory, and therefore will not benullif this object has been retrieved from the database.- Returns:
- the field
- Throws:
- com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException- This will be thrown if this method is called while the object is not attached to a session.
 
 - 
getDescriptionString getDescription() Get the value for Description. (The name of the job.) This value is mandatory, and therefore will not benullif this object has been retrieved from the database.- Returns:
- the field
- Throws:
- com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException- This will be thrown if this method is called while the object is not attached to a session.
 
 - 
getSearchDescriptionString getSearchDescription() Get the value for SearchDescription. (The description converted to upper-case, used for searching.) This value is mandatory, and therefore will not benullif this object has been retrieved from the database.- Returns:
- the field
- Throws:
- com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException- This will be thrown if this method is called while the object is not attached to a session.
 
 - 
getErrorDescriptionString getErrorDescription() Get the value for ErrorDescription. (The description of the error that occurred when forecasting this job.) This value is mandatory, and therefore will not benullif this object has been retrieved from the database.- Returns:
- the field
- Throws:
- com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException- This will be thrown if this method is called while the object is not attached to a session.
 
 - 
getEstimatesJobEstimates getEstimates() Get the value for Estimates. (Estimates for this job.) This value is mandatory, and therefore will not benullif this object has been retrieved from the database.- Returns:
- the field
- Throws:
- com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException- This will be thrown if this method is called while the object is not attached to a session.
 
 - 
getExpectedEndTimeDateTimeZone getExpectedEndTime() Get the value for ExpectedEndTime. (The date and time when the job is expected to finish.) This value is mandatory, and therefore will not benullif this object has been retrieved from the database.- Returns:
- the field
- Throws:
- com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException- This will be thrown if this method is called while the object is not attached to a session.
 
 - 
getExpectedRunTimeLong getExpectedRunTime() Get the value for ExpectedRunTime. (The average run time from the JobDefinition statistics when the forecast job is created.)- Returns:
- the field
- Throws:
- com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException- This will be thrown if this method is called while the object is not attached to a session.
 
 - 
getExpectedStartTimeDateTimeZone getExpectedStartTime() Get the value for ExpectedStartTime. (The date and time the job is expected to start executing.) This value is mandatory, and therefore will not benullif this object has been retrieved from the database.- Returns:
- the field
- Throws:
- com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException- This will be thrown if this method is called while the object is not attached to a session.
 
 - 
getForecastStatusForecastJobStatus getForecastStatus() Get the value for ForecastStatus. (The current status of the job) This value is mandatory, and therefore will not benullif this object has been retrieved from the database.- Returns:
- the field
- Throws:
- com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException- This will be thrown if this method is called while the object is not attached to a session.
 
 - 
getFrequencyLong getFrequency() Get the value for Frequency. (The number of times the job will submit between the expected start and end time.) This value is mandatory, and therefore will not benullif this object has been retrieved from the database.- Returns:
- the field
- Throws:
- com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException- This will be thrown if this method is called while the object is not attached to a session.
 
 - 
getJobGroupEndDateDateTimeZone getJobGroupEndDate() Get the value for JobGroupEndDate. (The job group ends at the defined date and time. )- Returns:
- the field
- Throws:
- com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException- This will be thrown if this method is called while the object is not attached to a session.
 
 - 
getJobGroupIdLong getJobGroupId() Get the value for JobGroupId. (The job group id for external use. Note that the JobGroup object is not externally visible.) This value is mandatory, and therefore will not benullif this object has been retrieved from the database.- Returns:
- the field
- Throws:
- com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException- This will be thrown if this method is called while the object is not attached to a session.
 
 - 
getJobGroupMaxJobsLong getJobGroupMaxJobs() Get the value for JobGroupMaxJobs. (The job group ends if the defined maximum of jobs is reached. )- Returns:
- the field
- Throws:
- com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException- This will be thrown if this method is called while the object is not attached to a session.
 
 - 
getJobGroupPresubmitCountLong getJobGroupPresubmitCount() Get the value for JobGroupPresubmitCount. (The number of jobs that is scheduled in advance for the job group.)- Returns:
- the field
- Throws:
- com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException- This will be thrown if this method is called while the object is not attached to a session.
 
 - 
getJobStatusJobStatus getJobStatus() Get the value for JobStatus. (The current status of the job) This value is mandatory, and therefore will not benullif this object has been retrieved from the database.- Returns:
- the field
- Throws:
- com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException- This will be thrown if this method is called while the object is not attached to a session.
 
 - 
getMaintenanceJobMaintenance getMaintenance() Get the value for Maintenance. (The maintenance level for the Job.) This value is mandatory, and therefore will not benullif this object has been retrieved from the database.- Returns:
- the field
- Throws:
- com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException- This will be thrown if this method is called while the object is not attached to a session.
 
 - 
getNextSubmitBaseTimeDateTimeZone getNextSubmitBaseTime() Get the value for NextSubmitBaseTime. (The time that will be used as a start time for the calculation of the next RequestedStartTime for a Job with a SubmitFrame or a RecurrencePattern.) This value is mandatory, and therefore will not benullif this object has been retrieved from the database.- Returns:
- the field
- Throws:
- com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException- This will be thrown if this method is called while the object is not attached to a session.
 
 - 
getNumChildForecastJobsLong getNumChildForecastJobs() Get the value for NumChildForecastJobs. (How many children ForecastJobs does this ForecastJob have? This is a performance optimization field.) This value is mandatory, and therefore will not benullif this object has been retrieved from the database.- Returns:
- the field
- Throws:
- com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException- This will be thrown if this method is called while the object is not attached to a session.
 
 - 
getPriorityLong getPriority() Get the value for Priority. (The priority of a job. priority 1-100, higher has precedence; This field only has relevance if the resources or queue size is limited.) This value is mandatory, and therefore will not benullif this object has been retrieved from the database.- Returns:
- the field
- Throws:
- com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException- This will be thrown if this method is called while the object is not attached to a session.
 
 - 
getRecurrencePatternString getRecurrencePattern() Get the value for RecurrencePattern. (The recurrence pattern for this forecast)- Returns:
- the field
- Throws:
- com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException- This will be thrown if this method is called while the object is not attached to a session.
 
 - 
getReturnCodeLong getReturnCode() Get the value for ReturnCode. (The return code of the job)- Returns:
- the field
- Throws:
- com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException- This will be thrown if this method is called while the object is not attached to a session.
 
 - 
getStartAtValueString getStartAtValue() Get the value for StartAtValue. (At which job chain step the job should start running from.)- Returns:
- the field
- Throws:
- com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException- This will be thrown if this method is called while the object is not attached to a session.
 
 - 
getStartTimeDateTimeZone getStartTime() Get the value for StartTime. (The date and time the job is expected to start executing.) This value is mandatory, and therefore will not benullif this object has been retrieved from the database.- Returns:
- the field
- Throws:
- com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException- This will be thrown if this method is called while the object is not attached to a session.
 
 - 
getStepIterationLong getStepIteration() Get the value for StepIteration. (For job chain steps and their calls only: Iteration number.)- Returns:
- the field
- Throws:
- com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException- This will be thrown if this method is called while the object is not attached to a session.
 
 - 
setDescriptionvoid setDescription(String newDescription) Set the value for Description. (The name of the job.) This value is mandatory.- Parameters:
- newDescription- the new value for Description. If this is- null, then the object cannot be persisted.
- Throws:
- com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException- This will be thrown if this method is called while the object is not attached to a session.
 
 - 
setExpectedRunTimevoid setExpectedRunTime(Long newExpectedRunTime) Set the value for ExpectedRunTime. (The average run time from the JobDefinition statistics when the forecast job is created.) This value is optional.- Parameters:
- newExpectedRunTime- the new value for ExpectedRunTime.
- Throws:
- com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException- This will be thrown if this method is called while the object is not attached to a session.
 
 - 
setFrequencyvoid setFrequency(Long newFrequency) Set the value for Frequency. (The number of times the job will submit between the expected start and end time.) This value is mandatory.- Parameters:
- newFrequency- the new value for Frequency. If this is- null, then the object cannot be persisted.
- Throws:
- com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException- This will be thrown if this method is called while the object is not attached to a session.
 
 - 
setJobGroupIdvoid setJobGroupId(Long newJobGroupId) Set the value for JobGroupId. (The job group id for external use. Note that the JobGroup object is not externally visible.) This value is mandatory.- Parameters:
- newJobGroupId- the new value for JobGroupId. If this is- null, then the object cannot be persisted.
- Throws:
- com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException- This will be thrown if this method is called while the object is not attached to a session.
 
 - 
setStartTimevoid setStartTime(DateTimeZone newStartTime) Set the value for StartTime. (The date and time the job is expected to start executing.) This value is mandatory.- Parameters:
- newStartTime- the new value for StartTime. If this is- null, then the object cannot be persisted.
- Throws:
- com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException- This will be thrown if this method is called while the object is not attached to a session.
 
 - 
forecastRWIterable<ForecastJob> forecast(JobForecastContext forecastContext) Create forecast jobs based on the current forecast job. The start and run time determine the forecast period. A forecast job without job group and zero frequency will return an iterator with all job groups that will be forecast in the requested time interval. If job group is filled and frequency is zero, an iterator with the forecast jobs for that job group in the requested time interval is returned.- Specified by:
- forecastin interface- ForecastJobComp
- Parameters:
- forecastContext- An object with the parameters for the forecast.
- Returns:
- The iterator over the all forecast jobs.
 
 - 
forecastJobvoid forecastJob(JobForecastContext forecastContext) Fill this forecast job with a forecast for the job that is set in the job attribute. If the job is a chain, the forecasts for the steps and calls will be child objects of the returned forecast job.- Parameters:
- forecastContext- An object with the parameters for the forecast.
 
 - 
getJobLocksRWIterable<JobDefinitionJobLock> getJobLocks() Return the JobLocks for this forecast job.- Specified by:
- getJobLocksin interface- ForecastJobComp
- Returns:
- The iterator over the JobLocks for this forecast job.
 
 - 
getRaiseEventsRWIterable<JobDefinitionRaiseEvent> getRaiseEvents() Return the event definitions that are forecasted to be raised.- Specified by:
- getRaiseEventsin interface- ForecastJobComp
- Returns:
- The iterator over the event definitions that are forecasted to be raised.
 
 - 
getWaitEventsRWIterable<JobDefinitionWaitEvent> getWaitEvents() Return the event definitions that are forecasted to be waited for.- Specified by:
- getWaitEventsin interface- ForecastJobComp
- Returns:
- The iterator over the event definitions that are forecasted to be waited for.
 
 - 
getParentForecastJobForecastJob getParentForecastJob() Get the ParentForecastJob.- Returns:
- ParentForecastJob
- Throws:
- com.redwood.scheduler.api.exception.ObjectDeletedException- If this method is called when the object has been marked for deletion.
- com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException- If this method is called when the object has been removed from it's session.
 
 - 
getJobJob getJob() Get the Job.- Returns:
- Job
- Throws:
- com.redwood.scheduler.api.exception.ObjectDeletedException- If this method is called when the object has been marked for deletion.
- com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException- If this method is called when the object has been removed from it's session.
 
 - 
getJobChainCallJobChainCall getJobChainCall() Get the JobChainCall.- Returns:
- JobChainCall
- Throws:
- com.redwood.scheduler.api.exception.ObjectDeletedException- If this method is called when the object has been marked for deletion.
- com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException- If this method is called when the object has been removed from it's session.
 
 - 
getJobChainStepJobChainStep getJobChainStep() Get the JobChainStep.- Returns:
- JobChainStep
- Throws:
- com.redwood.scheduler.api.exception.ObjectDeletedException- If this method is called when the object has been marked for deletion.
- com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException- If this method is called when the object has been removed from it's session.
 
 - 
getJobDefinitionJobDefinition getJobDefinition() Get the JobDefinition.- Returns:
- JobDefinition
- Throws:
- com.redwood.scheduler.api.exception.ObjectDeletedException- If this method is called when the object has been marked for deletion.
- com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException- If this method is called when the object has been removed from it's session.
 
 - 
getQueueQueue getQueue() Get the Queue.- Returns:
- Queue
- Throws:
- com.redwood.scheduler.api.exception.ObjectDeletedException- If this method is called when the object has been marked for deletion.
- com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException- If this method is called when the object has been removed from it's session.
 
 - 
getSubmitFrameSubmitFrame getSubmitFrame() Get the SubmitFrame.- Returns:
- SubmitFrame
- Throws:
- com.redwood.scheduler.api.exception.ObjectDeletedException- If this method is called when the object has been marked for deletion.
- com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException- If this method is called when the object has been removed from it's session.
 
 - 
getTimeWindowTimeWindow getTimeWindow() Get the TimeWindow.- Returns:
- TimeWindow
- Throws:
- com.redwood.scheduler.api.exception.ObjectDeletedException- If this method is called when the object has been marked for deletion.
- com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException- If this method is called when the object has been removed from it's session.
 
 - 
setParentForecastJobvoid setParentForecastJob(ForecastJob newParentForecastJob) Set the value for ParentForecastJob. This value is optional.- Parameters:
- newParentForecastJob- is the object to set ParentForecastJob to. The parent Job of this Job.
 
 - 
setJobvoid setJob(Job newJob) Set the value for Job. This value is optional.- Parameters:
- newJob- is the object to set Job to. The real job for a forecast job.
 
 - 
setJobChainCallvoid setJobChainCall(JobChainCall newJobChainCall) Set the value for JobChainCall. This value is optional.- Parameters:
- newJobChainCall- is the object to set JobChainCall to. The forecast job of a job chain call.
 
 - 
setJobChainStepvoid setJobChainStep(JobChainStep newJobChainStep) Set the value for JobChainStep. This value is optional.- Parameters:
- newJobChainStep- is the object to set JobChainStep to. The forecast job representing a job chain step.
 
 - 
setJobDefinitionvoid setJobDefinition(JobDefinition newJobDefinition) Set the value for JobDefinition. This value is mandatory.- Parameters:
- newJobDefinition- is the object to set JobDefinition to. The job definition for a forecast job. If this is- null, then the object cannot be persisted.
 
 - 
setQueuevoid setQueue(Queue newQueue) Set the value for Queue. This value is mandatory.- Parameters:
- newQueue- is the object to set Queue to. The queue of a forecast job. If this is- null, then the object cannot be persisted.
 
 - 
setSubmitFramevoid setSubmitFrame(SubmitFrame newSubmitFrame) Set the value for SubmitFrame. This value is optional.- Parameters:
- newSubmitFrame- is the object to set SubmitFrame to. The submit frame of a forecast job.
 
 - 
setTimeWindowvoid setTimeWindow(TimeWindow newTimeWindow) Set the value for TimeWindow. This value is optional.- Parameters:
- newTimeWindow- is the object to set TimeWindow to. The time window of a forecast job.
 
 - 
getChildForecastJobsRWIterable<ForecastJob> getChildForecastJobs() Get anRWIterableover a collection ofChildForecastJobs, the collection will be ordered by ChildOrder. If the collection is empty, an empty iterator will be returned, that is, this method will never returnnull. The parent Job of this Job.- Specified by:
- getChildForecastJobsin interface- ForecastJobComp
- Returns:
- An RWIterableover a collection ofForecastJobobjects , the collection will be ordered by ChildOrder.
 
 
- 
 
-