/** * <p> * Return a list of <code>JobExecutionContext</code> objects that * represent all currently executing Jobs in this Scheduler instance. * </p> * * <p> * This method is not cluster aware. That is, it will only return Jobs * currently executing in this Scheduler instance, not across the entire * cluster. * </p> * * <p> * Note that the list returned is an 'instantaneous' snap-shot, and that as * soon as it's returned, the true list of executing jobs may be different. * </p> */ public List<JobExecutionContext> getCurrentlyExecutingJobs() { return jobMgr.getExecutingJobs(); }
public int numJobsExecuted() { return jobMgr.getNumJobsFired(); }
/** * <p> * Create a <code>QuartzScheduler</code> with the given configuration * properties. * </p> * * @see QuartzSchedulerResources */ public QuartzScheduler(QuartzSchedulerResources resources, long idleWaitTime, @Deprecated long dbRetryInterval) throws SchedulerException { this.resources = resources; if (resources.getJobStore() instanceof JobListener) { addInternalJobListener((JobListener)resources.getJobStore()); } this.schedThread = new QuartzSchedulerThread(this, resources); ThreadExecutor schedThreadExecutor = resources.getThreadExecutor(); schedThreadExecutor.execute(this.schedThread); if (idleWaitTime > 0) { this.schedThread.setIdleWaitTime(idleWaitTime); } jobMgr = new ExecutingJobsManager(); addInternalJobListener(jobMgr); errLogger = new ErrorLogger(); addInternalSchedulerListener(errLogger); signaler = new SchedulerSignalerImpl(this, this.schedThread); getLog().info("Quartz Scheduler v." + getVersion() + " created."); }
while (jobMgr.getNumJobsCurrentlyExecuting() > 0) { try { Thread.sleep(100);
/** * <p> * Create a <code>QuartzScheduler</code> with the given configuration * properties. * </p> * * @see QuartzSchedulerResources */ public QuartzScheduler(QuartzSchedulerResources resources, long idleWaitTime, @Deprecated long dbRetryInterval) throws SchedulerException { this.resources = resources; if (resources.getJobStore() instanceof JobListener) { addInternalJobListener((JobListener)resources.getJobStore()); } this.schedThread = new QuartzSchedulerThread(this, resources); ThreadExecutor schedThreadExecutor = resources.getThreadExecutor(); schedThreadExecutor.execute(this.schedThread); if (idleWaitTime > 0) { this.schedThread.setIdleWaitTime(idleWaitTime); } jobMgr = new ExecutingJobsManager(); addInternalJobListener(jobMgr); errLogger = new ErrorLogger(); addInternalSchedulerListener(errLogger); signaler = new SchedulerSignalerImpl(this, this.schedThread); getLog().info("Quartz Scheduler v." + getVersion() + " created."); }
while (jobMgr.getNumJobsCurrentlyExecuting() > 0) { try { Thread.sleep(100);
public int numJobsExecuted() { return jobMgr.getNumJobsFired(); }
/** * <p> * Return a list of <code>JobExecutionContext</code> objects that * represent all currently executing Jobs in this Scheduler instance. * </p> * * <p> * This method is not cluster aware. That is, it will only return Jobs * currently executing in this Scheduler instance, not across the entire * cluster. * </p> * * <p> * Note that the list returned is an 'instantaneous' snap-shot, and that as * soon as it's returned, the true list of executing jobs may be different. * </p> */ public List<JobExecutionContext> getCurrentlyExecutingJobs() { return jobMgr.getExecutingJobs(); }
jobMgr = new ExecutingJobsManager(); addGlobalJobListener(jobMgr); errLogger = new ErrorLogger();
public int numJobsExecuted() { return jobMgr.getNumJobsFired(); }
/** * <p> * Return a list of <code>JobExecutionContext</code> objects that * represent all currently executing Jobs in this Scheduler instance. * </p> * * <p> * This method is not cluster aware. That is, it will only return Jobs * currently executing in this Scheduler instance, not across the entire * cluster. * </p> * * <p> * Note that the list returned is an 'instantaneous' snap-shot, and that as * soon as it's returned, the true list of executing jobs may be different. * </p> */ public List getCurrentlyExecutingJobs() { return jobMgr.getExecutingJobs(); }
jobMgr = new ExecutingJobsManager(); addGlobalJobListener(jobMgr); errLogger = new ErrorLogger();
public int numJobsExecuted() { return jobMgr.getNumJobsFired(); }
/** * <p> * Return a list of <code>JobExecutionContext</code> objects that * represent all currently executing Jobs in this Scheduler instance. * </p> * * <p> * This method is not cluster aware. That is, it will only return Jobs * currently executing in this Scheduler instance, not across the entire * cluster. * </p> * * <p> * Note that the list returned is an 'instantaneous' snap-shot, and that as * soon as it's returned, the true list of executing jobs may be different. * </p> */ public List getCurrentlyExecutingJobs() { return jobMgr.getExecutingJobs(); }