/** * <p> * Store the given <code>{@link org.quartz.JobDetail}</code> and <code>{@link org.quartz.Trigger}</code>. * </p> * * @param newJob * The <code>JobDetail</code> to be stored. * @param newTrigger * The <code>Trigger</code> to be stored. * @throws ObjectAlreadyExistsException * if a <code>Job</code> with the same name/group already * exists. */ public void storeJobAndTrigger(JobDetail newJob, OperableTrigger newTrigger) throws JobPersistenceException { storeJob(newJob, false); storeTrigger(newTrigger, false); }
/** * <p> * Store the given <code>{@link org.quartz.JobDetail}</code> and <code>{@link org.quartz.Trigger}</code>. * </p> * * @param newJob * The <code>JobDetail</code> to be stored. * @param newTrigger * The <code>Trigger</code> to be stored. * @throws ObjectAlreadyExistsException * if a <code>Job</code> with the same name/group already * exists. */ public void storeJobAndTrigger(JobDetail newJob, OperableTrigger newTrigger) throws JobPersistenceException { storeJob(newJob, false); storeTrigger(newTrigger, false); }
storeTrigger(newTrigger, false); } catch(JobPersistenceException jpe) { storeTrigger(tw.getTrigger(), false); // put previous trigger back... throw jpe;
public void storeJobsAndTriggers( Map<JobDetail, Set<? extends Trigger>> triggersAndJobs, boolean replace) throws JobPersistenceException { synchronized (lock) { // make sure there are no collisions... if(!replace) { for(Entry<JobDetail, Set<? extends Trigger>> e: triggersAndJobs.entrySet()) { if(checkExists(e.getKey().getKey())) throw new ObjectAlreadyExistsException(e.getKey()); for(Trigger trigger: e.getValue()) { if(checkExists(trigger.getKey())) throw new ObjectAlreadyExistsException(trigger); } } } // do bulk add... for(Entry<JobDetail, Set<? extends Trigger>> e: triggersAndJobs.entrySet()) { storeJob(e.getKey(), true); for(Trigger trigger: e.getValue()) { storeTrigger((OperableTrigger) trigger, true); } } } }
public void storeJobsAndTriggers( Map<JobDetail, Set<? extends Trigger>> triggersAndJobs, boolean replace) throws JobPersistenceException { synchronized (lock) { // make sure there are no collisions... if(!replace) { for(Entry<JobDetail, Set<? extends Trigger>> e: triggersAndJobs.entrySet()) { if(checkExists(e.getKey().getKey())) throw new ObjectAlreadyExistsException(e.getKey()); for(Trigger trigger: e.getValue()) { if(checkExists(trigger.getKey())) throw new ObjectAlreadyExistsException(trigger); } } } // do bulk add... for(Entry<JobDetail, Set<? extends Trigger>> e: triggersAndJobs.entrySet()) { storeJob(e.getKey(), true); for(Trigger trigger: e.getValue()) { storeTrigger((OperableTrigger) trigger, true); } } } }
storeTrigger(newTrigger, false); } catch(JobPersistenceException jpe) { storeTrigger(tw.getTrigger(), false); // put previous trigger back... throw jpe;
@Override public void storeTrigger(OperableTrigger newTrigger, boolean replaceExisting) throws JobPersistenceException { super.storeTrigger(newTrigger, replaceExisting); persistJobAndTrigger(null, newTrigger); }
@Override public void storeTrigger(OperableTrigger newTrigger, boolean replaceExisting) throws JobPersistenceException { super.storeTrigger(newTrigger, replaceExisting); persistJobAndTrigger(null, newTrigger); }
/** * <p> * Store the given <code>{@link org.quartz.JobDetail}</code> and <code>{@link org.quartz.Trigger}</code>. * </p> * * @param newJob * The <code>JobDetail</code> to be stored. * @param newTrigger * The <code>Trigger</code> to be stored. * @throws ObjectAlreadyExistsException * if a <code>Job</code> with the same name/group already * exists. */ public void storeJobAndTrigger(SchedulingContext ctxt, JobDetail newJob, Trigger newTrigger) throws JobPersistenceException { storeJob(ctxt, newJob, false); storeTrigger(ctxt, newTrigger, false); }
/** * <p> * Store the given <code>{@link org.quartz.JobDetail}</code> and <code>{@link org.quartz.Trigger}</code>. * </p> * * @param newJob * The <code>JobDetail</code> to be stored. * @param newTrigger * The <code>Trigger</code> to be stored. * @throws ObjectAlreadyExistsException * if a <code>Job</code> with the same name/group already * exists. */ public void storeJobAndTrigger(SchedulingContext ctxt, JobDetail newJob, Trigger newTrigger) throws JobPersistenceException { storeJob(ctxt, newJob, false); storeTrigger(ctxt, newTrigger, false); }
storeTrigger(ctxt, newTrigger, false); } catch(JobPersistenceException jpe) { storeTrigger(ctxt, tw.getTrigger(), false); // put previous trigger back... throw jpe;
storeTrigger(ctxt, newTrigger, false); } catch(JobPersistenceException jpe) { storeTrigger(ctxt, tw.getTrigger(), false); // put previous trigger back... throw jpe;
continue; super.storeTrigger(trigger.trigger, true);
continue; super.storeTrigger(trigger.trigger, true);