/** * <p> * Trigger the identified <code>{@link org.quartz.Job}</code> (execute it * now) - with a non-volatile trigger. * </p> */ @SuppressWarnings("deprecation") public void triggerJob(JobKey jobKey, JobDataMap data) throws SchedulerException { validateState(); OperableTrigger trig = (OperableTrigger) newTrigger().withIdentity(newTriggerId(), Scheduler.DEFAULT_GROUP).forJob(jobKey).build(); trig.computeFirstFireTime(null); if(data != null) { trig.setJobDataMap(data); } boolean collision = true; while (collision) { try { resources.getJobStore().storeTrigger(trig, false); collision = false; } catch (ObjectAlreadyExistsException oaee) { trig.setKey(new TriggerKey(newTriggerId(), Scheduler.DEFAULT_GROUP)); } } notifySchedulerThread(trig.getNextFireTime().getTime()); notifySchedulerListenersSchduled(trig); }
/** * <p> * Get the names of all registered <code>{@link Calendar}s</code>. * </p> */ public List<String> getCalendarNames() throws SchedulerException { validateState(); return resources.getJobStore().getCalendarNames(); }
/** * <p> * Get the names of all known <code>{@link org.quartz.Job}</code> groups. * </p> */ public List<String> getJobGroupNames() throws SchedulerException { validateState(); return resources.getJobStore().getJobGroupNames(); }
try { schedInstId = DEFAULT_INSTANCE_ID; if (js.isClustered()) { schedInstId = instanceIdGenerator.generateInstanceId(); js.setInstanceId(schedInstId); js.setInstanceName(schedName); js.setThreadPoolSize(tp.getPoolSize()); js.initialize(loadHelper, qs.getSchedulerSignaler());
cal = resources.getJobStore().retrieveCalendar(trigger.getCalendarName()); if(cal == null) { throw new SchedulerException( resources.getJobStore().storeTrigger(trig, false); notifySchedulerThread(trigger.getNextFireTime().getTime()); notifySchedulerListenersSchduled(trigger);
jobStore.initialize(cch, qs.getSchedulerSignaler());
/** * <p> * Get the current state of the identified <code>{@link Trigger}</code>. * </p> J * * @see TriggerState */ public TriggerState getTriggerState(TriggerKey triggerKey) throws SchedulerException { validateState(); return resources.getJobStore().getTriggerState(triggerKey); }
/** * <p> * Get all <code>{@link Trigger}</code> s that are associated with the * identified <code>{@link org.quartz.JobDetail}</code>. * </p> */ public List<? extends Trigger> getTriggersOfJob(JobKey jobKey) throws SchedulerException { validateState(); return resources.getJobStore().getTriggersForJob(jobKey); }
/** * <p> * Get the names of all known <code>{@link org.quartz.Trigger}</code> * groups. * </p> */ public List<String> getTriggerGroupNames() throws SchedulerException { validateState(); return resources.getJobStore().getTriggerGroupNames(); }
/** * <p> * Pause the <code>{@link org.quartz.JobDetail}</code> with the given * name - by pausing all of its current <code>Trigger</code>s. * </p> * */ public void pauseJob(JobKey jobKey) throws SchedulerException { validateState(); resources.getJobStore().pauseJob(jobKey); notifySchedulerThread(0L); notifySchedulerListenersPausedJob(jobKey); }
public Set<String> getPausedTriggerGroups() throws SchedulerException { return resources.getJobStore().getPausedTriggerGroups(); }
/** * <p> * Pause all triggers - equivalent of calling <code>pauseTriggers(GroupMatcher<TriggerKey>)</code> * with a matcher matching all known groups. * </p> * * <p> * When <code>resumeAll()</code> is called (to un-pause), trigger misfire * instructions WILL be applied. * </p> * * @see #resumeAll() * @see #pauseTriggers(org.quartz.impl.matchers.GroupMatcher) * @see #standby() */ public void pauseAll() throws SchedulerException { validateState(); resources.getJobStore().pauseAll(); notifySchedulerThread(0L); notifySchedulerListenersPausedTriggers(null); }
try { schedInstId = DEFAULT_INSTANCE_ID; if (js.isClustered()) { schedInstId = instanceIdGenerator.generateInstanceId(); js.setInstanceId(schedInstId); js.setInstanceName(schedName); js.setThreadPoolSize(tp.getPoolSize()); js.initialize(loadHelper, qs.getSchedulerSignaler());
cal = resources.getJobStore().retrieveCalendar(trigger.getCalendarName()); if(cal == null) { throw new SchedulerException( resources.getJobStore().storeTrigger(trig, false); notifySchedulerThread(trigger.getNextFireTime().getTime()); notifySchedulerListenersSchduled(trigger);
jobStore.initialize(cch, qs.getSchedulerSignaler());
/** * <p> * Get the current state of the identified <code>{@link Trigger}</code>. * </p> J * * @see TriggerState */ public TriggerState getTriggerState(TriggerKey triggerKey) throws SchedulerException { validateState(); return resources.getJobStore().getTriggerState(triggerKey); }
/** * <p> * Get all <code>{@link Trigger}</code> s that are associated with the * identified <code>{@link org.quartz.JobDetail}</code>. * </p> */ public List<? extends Trigger> getTriggersOfJob(JobKey jobKey) throws SchedulerException { validateState(); return resources.getJobStore().getTriggersForJob(jobKey); }
/** * <p> * Get the names of all known <code>{@link org.quartz.Trigger}</code> * groups. * </p> */ public List<String> getTriggerGroupNames() throws SchedulerException { validateState(); return resources.getJobStore().getTriggerGroupNames(); }
/** * <p> * Pause the <code>{@link org.quartz.JobDetail}</code> with the given * name - by pausing all of its current <code>Trigger</code>s. * </p> * */ public void pauseJob(JobKey jobKey) throws SchedulerException { validateState(); resources.getJobStore().pauseJob(jobKey); notifySchedulerThread(0L); notifySchedulerListenersPausedJob(jobKey); }
public Set<String> getPausedTriggerGroups() throws SchedulerException { return resources.getJobStore().getPausedTriggerGroups(); }