|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.kuali.kfs.sys.batch.service.impl.SchedulerServiceImpl
@Transactional public class SchedulerServiceImpl
| Field Summary | |
|---|---|
protected Map<String,JobDescriptor> |
externalizedJobDescriptors
Holds a list of job name to job descriptor mappings for those jobs that are externalized (i.e. |
protected static String |
HARD_DEPENDENCY_CODE
|
static String |
JOB_STATUS_PARAMETER
|
protected static List<String> |
jobStatuses
|
protected static String |
SCHEDULE_JOB_NAME
|
protected static String |
SOFT_DEPENDENCY_CODE
|
| Fields inherited from interface org.kuali.kfs.sys.batch.service.SchedulerService |
|---|
CANCELLED_JOB_STATUS_CODE, FAILED_JOB_STATUS_CODE, PENDING_JOB_STATUS_CODE, RUNNING_JOB_STATUS_CODE, SCHEDULED_GROUP, SCHEDULED_JOB_STATUS_CODE, SUCCEEDED_JOB_STATUS_CODE, UNSCHEDULED_GROUP |
| Constructor Summary | |
|---|---|
SchedulerServiceImpl()
|
|
| Method Summary | |
|---|---|
protected void |
addJob(org.quartz.JobDetail jobDetail)
|
void |
addScheduled(org.quartz.JobDetail job)
Adds the given job to the "scheduled" group. |
protected void |
addTrigger(org.quartz.Trigger trigger)
|
void |
addUnscheduled(org.quartz.JobDetail job)
Adds the given job to the "unscheduled" group. |
BatchJobStatus |
getJob(String groupName,
String jobName)
Gets a single job based on its name and group. |
protected Map<String,String> |
getJobDependencies(String jobName)
|
List<BatchJobStatus> |
getJobs()
Get all jobs known to the scheduler wrapped within a BusinessObject-derived class. |
List<BatchJobStatus> |
getJobs(String groupName)
|
List<String> |
getJobStatuses()
Returns a list of all possible statuses. |
Date |
getNextStartTime(BatchJobStatus job)
Returns the next start time for the given job. |
Date |
getNextStartTime(String groupName,
String jobName)
Returns the next start time for the given job. |
List<org.quartz.JobExecutionContext> |
getRunningJobs()
Returns the list of job currently running within the scheduler. |
protected org.quartz.JobDetail |
getScheduledJobDetail(String jobName)
|
List<String> |
getSchedulerGroups()
Returns a list of all groups defined in the scheduler. |
String |
getStatus(org.quartz.JobDetail jobDetail)
|
boolean |
hasIncompleteJob()
This method checks whether any jobs in the SCHEDULED job group are pending or currently scheduled. |
void |
initialize()
|
void |
initializeJob(String jobName,
Job job)
|
protected void |
initializeJobsForModule(org.kuali.rice.kns.service.ModuleService moduleService)
Initializes all of the jobs into Quartz for the given ModuleService |
protected void |
initializeTriggersForModule(org.kuali.rice.kns.service.ModuleService moduleService)
Loops through all the triggers associated with the given module service, adding each trigger to Quartz |
void |
interruptJob(String jobName)
Requests that the given job be stopped as soon as possble. |
protected boolean |
isCancelled(org.quartz.JobDetail jobDetail)
|
protected boolean |
isDependencySatisfiedNegatively(org.quartz.JobDetail dependentJobDetail,
org.quartz.JobDetail dependencyJobDetail)
|
protected boolean |
isDependencySatisfiedPositively(org.quartz.JobDetail dependentJobDetail,
org.quartz.JobDetail dependencyJobDetail)
|
protected boolean |
isFailed(org.quartz.JobDetail jobDetail)
|
protected boolean |
isIncomplete(org.quartz.JobDetail scheduledJobDetail)
|
boolean |
isJobRunning(String jobName)
Tests whether the referenced job name is running, regardless of group. |
boolean |
isPastScheduleCutoffTime()
This method should be used to determine when the daily batch schedule should terminate. |
protected boolean |
isPastScheduleCutoffTime(Calendar dateTime,
boolean log)
|
protected boolean |
isPending(org.quartz.JobDetail jobDetail)
|
protected boolean |
isScheduled(org.quartz.JobDetail jobDetail)
|
protected boolean |
isSoftDependency(String dependentJobName,
String dependencyJobName)
|
protected boolean |
isSucceeded(org.quartz.JobDetail jobDetail)
|
protected void |
loadJob(JobDescriptor jobDescriptor)
|
void |
logScheduleResults()
|
void |
processWaitingJobs()
|
void |
reinitializeScheduledJobs()
|
void |
removeScheduled(String jobName)
Removes a job from the scheduled group. |
protected JobDescriptor |
retrieveJobDescriptor(String jobName)
|
void |
runJob(String jobName,
int startStep,
int stopStep,
Date startTime,
String requestorEmailAddress)
Immediately runs the specified job. |
void |
runJob(String jobName,
String requestorEmailAddress)
Immediately runs the specified job. |
void |
runJob(String groupName,
String jobName,
int startStep,
int stopStep,
Date jobStartTime,
String requestorEmailAddress)
|
void |
runStep(String groupName,
String jobName,
String stepName,
Date startTime,
String requestorEmailAddress)
|
protected void |
scheduleJob(String groupName,
String jobName,
int startStep,
int endStep,
Date startTime,
String requestorEmailAddress)
|
void |
setDateTimeService(org.kuali.rice.kns.service.DateTimeService dateTimeService)
Sets the dateTimeService attribute value. |
void |
setJobListener(JobListener jobListener)
Sets the jobListener attribute value. |
void |
setKualiModuleService(org.kuali.rice.kns.service.KualiModuleService moduleService)
Sets the moduleService attribute value. |
void |
setMailService(org.kuali.rice.kns.service.MailService mailService)
|
void |
setParameterService(org.kuali.rice.kns.service.ParameterService parameterService)
|
void |
setScheduler(org.quartz.Scheduler scheduler)
Sets the scheduler attribute value. |
protected boolean |
shouldCancelJob(org.quartz.JobDetail jobDetail)
|
boolean |
shouldNotRun(org.quartz.JobDetail jobDetail)
|
protected boolean |
shouldScheduleJob(org.quartz.JobDetail jobDetail)
|
void |
updateStatus(org.quartz.JobDetail jobDetail,
String jobStatus)
|
protected void |
updateStatus(String groupName,
String jobName,
String jobStatus)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final String SCHEDULE_JOB_NAME
public static final String JOB_STATUS_PARAMETER
protected static final String SOFT_DEPENDENCY_CODE
protected static final String HARD_DEPENDENCY_CODE
protected Map<String,JobDescriptor> externalizedJobDescriptors
protected static final List<String> jobStatuses
| Constructor Detail |
|---|
public SchedulerServiceImpl()
| Method Detail |
|---|
public void initialize()
initialize in interface SchedulerServiceSchedulerService.initialize()protected void initializeJobsForModule(org.kuali.rice.kns.service.ModuleService moduleService)
moduleService - the ModuleService implementation to initalize jobs forprotected void initializeTriggersForModule(org.kuali.rice.kns.service.ModuleService moduleService)
moduleService - the ModuleService instance to initialize triggers forprotected void loadJob(JobDescriptor jobDescriptor)
public void initializeJob(String jobName,
Job job)
initializeJob in interface SchedulerServiceSchedulerService.initializeJob(java.lang.String,org.kuali.kfs.sys.batch.Job)public boolean hasIncompleteJob()
SchedulerService
hasIncompleteJob in interface SchedulerServiceSchedulerService.hasIncompleteJob()protected boolean isIncomplete(org.quartz.JobDetail scheduledJobDetail)
public boolean isPastScheduleCutoffTime()
SchedulerService
isPastScheduleCutoffTime in interface SchedulerServiceSchedulerService.isPastScheduleCutoffTime()
protected boolean isPastScheduleCutoffTime(Calendar dateTime,
boolean log)
public void processWaitingJobs()
processWaitingJobs in interface SchedulerServiceSchedulerService.processWaitingJobs()public void logScheduleResults()
logScheduleResults in interface SchedulerServiceSchedulerService.logScheduleResults()public boolean shouldNotRun(org.quartz.JobDetail jobDetail)
shouldNotRun in interface SchedulerServiceSchedulerService.shouldNotRun(org.quartz.JobDetail)
public void updateStatus(org.quartz.JobDetail jobDetail,
String jobStatus)
updateStatus in interface SchedulerServiceSchedulerService.updateStatus(org.quartz.JobDetail,java.lang.String jobStatus)
public void runJob(String jobName,
String requestorEmailAddress)
SchedulerService
runJob in interface SchedulerService
public void runJob(String jobName,
int startStep,
int stopStep,
Date startTime,
String requestorEmailAddress)
SchedulerService
runJob in interface SchedulerService
public void runJob(String groupName,
String jobName,
int startStep,
int stopStep,
Date jobStartTime,
String requestorEmailAddress)
public void runStep(String groupName,
String jobName,
String stepName,
Date startTime,
String requestorEmailAddress)
public boolean isJobRunning(String jobName)
SchedulerService
isJobRunning in interface SchedulerServiceprotected void addJob(org.quartz.JobDetail jobDetail)
protected void addTrigger(org.quartz.Trigger trigger)
protected void scheduleJob(String groupName,
String jobName,
int startStep,
int endStep,
Date startTime,
String requestorEmailAddress)
protected boolean shouldScheduleJob(org.quartz.JobDetail jobDetail)
protected boolean shouldCancelJob(org.quartz.JobDetail jobDetail)
protected boolean isDependencySatisfiedPositively(org.quartz.JobDetail dependentJobDetail,
org.quartz.JobDetail dependencyJobDetail)
protected boolean isDependencySatisfiedNegatively(org.quartz.JobDetail dependentJobDetail,
org.quartz.JobDetail dependencyJobDetail)
protected boolean isSoftDependency(String dependentJobName,
String dependencyJobName)
protected Map<String,String> getJobDependencies(String jobName)
protected boolean isPending(org.quartz.JobDetail jobDetail)
protected boolean isScheduled(org.quartz.JobDetail jobDetail)
protected boolean isSucceeded(org.quartz.JobDetail jobDetail)
protected boolean isFailed(org.quartz.JobDetail jobDetail)
protected boolean isCancelled(org.quartz.JobDetail jobDetail)
public String getStatus(org.quartz.JobDetail jobDetail)
getStatus in interface SchedulerServiceprotected org.quartz.JobDetail getScheduledJobDetail(String jobName)
public void setScheduler(org.quartz.Scheduler scheduler)
setScheduler in interface SchedulerServicescheduler - The scheduler to set.public void setParameterService(org.kuali.rice.kns.service.ParameterService parameterService)
public void setDateTimeService(org.kuali.rice.kns.service.DateTimeService dateTimeService)
dateTimeService - The dateTimeService to set.public void setKualiModuleService(org.kuali.rice.kns.service.KualiModuleService moduleService)
moduleService - The moduleService to set.public void setJobListener(JobListener jobListener)
jobListener - The jobListener to set.public List<BatchJobStatus> getJobs()
SchedulerService
getJobs in interface SchedulerService
public BatchJobStatus getJob(String groupName,
String jobName)
SchedulerService
getJob in interface SchedulerServicepublic List<BatchJobStatus> getJobs(String groupName)
getJobs in interface SchedulerServicepublic List<org.quartz.JobExecutionContext> getRunningJobs()
SchedulerService
getRunningJobs in interface SchedulerService
protected void updateStatus(String groupName,
String jobName,
String jobStatus)
public void removeScheduled(String jobName)
SchedulerService
removeScheduled in interface SchedulerServicepublic void addScheduled(org.quartz.JobDetail job)
SchedulerService
addScheduled in interface SchedulerServicepublic void addUnscheduled(org.quartz.JobDetail job)
SchedulerService
addUnscheduled in interface SchedulerServicepublic List<String> getSchedulerGroups()
SchedulerService
getSchedulerGroups in interface SchedulerServicepublic List<String> getJobStatuses()
SchedulerService
getJobStatuses in interface SchedulerServicepublic void interruptJob(String jobName)
SchedulerService
interruptJob in interface SchedulerServicepublic Date getNextStartTime(BatchJobStatus job)
SchedulerService
getNextStartTime in interface SchedulerService
public Date getNextStartTime(String groupName,
String jobName)
SchedulerService
getNextStartTime in interface SchedulerServicepublic void setMailService(org.kuali.rice.kns.service.MailService mailService)
protected JobDescriptor retrieveJobDescriptor(String jobName)
public void reinitializeScheduledJobs()
reinitializeScheduledJobs in interface SchedulerService
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||