use of com.cloud.zhuwj.quartz.domain.JobAndTrigger in project spring-cloud-framework by zhuwj921.
the class JobAndTriggerImpl method getJobAndTriggerDetails.
public PageInfo<JobAndTrigger> getJobAndTriggerDetails(int pageNum, int pageSize) throws SchedulerException {
PageHelper.startPage(pageNum, pageSize);
List<JobAndTrigger> list = jobAndTriggerDAO.getJobAndTriggerDetails();
Iterator<JobAndTrigger> listIt = list.iterator();
while (listIt.hasNext()) {
JobAndTrigger jobAndTrigger = listIt.next();
Trigger.TriggerState triggerState = scheduler.getTriggerState(new TriggerKey(jobAndTrigger.getTriggerName(), jobAndTrigger.getTriggerGroup()));
if (triggerState == Trigger.TriggerState.NORMAL) {
jobAndTrigger.setRunning(true);
}
}
PageInfo<JobAndTrigger> page = new PageInfo<JobAndTrigger>(list);
return page;
}
Aggregations