@Override public JobDataMap getJobDataMap() { if (jobDataMap == null) { jobDataMap = new JobDataMap(); } return jobDataMap; }
@Override public JobDataMap getJobDataMap() { if (jobDataMap == null) { jobDataMap = new JobDataMap(); } return jobDataMap; }
@Override public JobDataMap getJobDataMap() { if (jobDataMap == null) { jobDataMap = new JobDataMap(); } return jobDataMap; }
@Override public JobDataMap getJobDataMap() { if (jobDataMap == null) { jobDataMap = new JobDataMap(); } return jobDataMap; }
@Override public JobDataMap getJobDataMap() { if (jobDataMap == null) { jobDataMap = new JobDataMap(); } return jobDataMap; }
@Override public JobDataMap getJobDataMap() { if (jobDataMap == null) { jobDataMap = new JobDataMap(); } return jobDataMap; }
public JobDataMap shallowCopy() { return new JobDataMap(this); } }
public JobDataMap shallowCopy() { return new JobDataMap(this); } }
public JobDataMap shallowCopy() { return new JobDataMap(this); } }
/** * Starts a Job matching the the given Job Name found in jobs.xml * * @param jobName */ public static void startJob(String jobName, Map<String, Object> params) { try { JobDataMap jobDataMap = new JobDataMap(); for (String key : params.keySet()) { // logger.debug("key= " + key); // logger.debug("value= " + pParams.get(key)); jobDataMap.put(key, params.get(key)); } getScheduler().triggerJob(jobName, jobDataMap); } catch (SchedulerException e) { logger.error("ERROR STARTING JOB!!!", e); } }
/** * Starts a Job matching the the given Job Name found in jobs.xml * * @param jobName */ public static void startJob(String jobName, Map<String, Object> params) throws SundialSchedulerException { try { JobDataMap jobDataMap = new JobDataMap(); for (String key : params.keySet()) { // logger.debug("key= " + key); // logger.debug("value= " + pParams.get(key)); jobDataMap.put(key, params.get(key)); } getScheduler().triggerJob(jobName, jobDataMap); } catch (SchedulerException e) { throw new SundialSchedulerException("ERROR STARTING JOB!!!", e); } }
/** * Starts a Job matching the the given Job Name found in jobs.xml * * @param jobName */ public static void startJob(String jobName, Map<String, Object> params) throws SundialSchedulerException { try { JobDataMap jobDataMap = new JobDataMap(); for (String key : params.keySet()) { // logger.debug("key= " + key); // logger.debug("value= " + pParams.get(key)); jobDataMap.put(key, params.get(key)); } getScheduler().triggerJob(jobName, jobDataMap); } catch (SchedulerException e) { throw new SundialSchedulerException("ERROR STARTING JOB!!!", e); } }
/** * Adds a Job to the scheduler. Replaces a matching existing Job. * * @param jobName * @param jobClass * @param params Set this null if there are no params * @param isConcurrencyAllowed */ public static void addJob(String jobName, Class<? extends Job> jobClass, Map<String, Object> params, boolean isConcurrencyAllowed) throws SundialSchedulerException { try { JobDataMap jobDataMap = new JobDataMap(); if (params != null) { for (Entry<String, Object> entry : params.entrySet()) { jobDataMap.put(entry.getKey(), entry.getValue()); } } JobDetail jobDetail = newJobBuilder(jobClass).withIdentity(jobName).usingJobData(jobDataMap).isConcurrencyAllowed(isConcurrencyAllowed).build(); getScheduler().addJob(jobDetail); } catch (SchedulerException e) { logger.error("ERROR ADDING JOB!!!", e); throw new SundialSchedulerException("ERROR ADDING JOB!!!", e); } }
/** * Adds a Job to the scheduler. Replaces a matching existing Job. * * @param jobName * @param jobClassName * @param params Set this null if there are no params * @param isConcurrencyAllowed */ public static void addJob(String jobName, String jobClassName, Map<String, Object> params, boolean isConcurrencyAllowed) { try { Class<? extends Job> jobClass = getScheduler().getCascadingClassLoadHelper().loadClass(jobClassName); JobDataMap jobDataMap = new JobDataMap(); if (params != null) { for (Entry<String, Object> entry : params.entrySet()) { jobDataMap.put(entry.getKey(), entry.getValue()); } } JobDetail jobDetail = newJobBuilder(jobClass).withIdentity(jobName).usingJobData(jobDataMap).isConcurrencyAllowed(isConcurrencyAllowed).build(); getScheduler().addJob(jobDetail); } catch (SchedulerException e) { logger.error("ERROR ADDING JOB!!!", e); } catch (ClassNotFoundException e) { logger.error("ERROR ADDING JOB!!!", e); } }
JobDataMap jobDataMap = new JobDataMap(); if (params != null) { for (Entry<String, Object> entry : params.entrySet()) {
if (cronTrigger != null) { JobDataMap jobDataMap = new JobDataMap(); if (simpleTrigger != null) { JobDataMap jobDataMap = new JobDataMap();
if (cronTrigger != null) { JobDataMap jobDataMap = new JobDataMap(); if (simpleTrigger != null) { JobDataMap jobDataMap = new JobDataMap();
/** Create a JobExcecutionContext with the given context data. */ public JobExecutionContextImpl(Scheduler scheduler, TriggerFiredBundle firedBundle, Job job) { this.scheduler = scheduler; this.trigger = firedBundle.getTrigger(); this.calendar = firedBundle.getCalendar(); this.jobDetail = firedBundle.getJobDetail(); this.job = job; this.recovering = firedBundle.isRecovering(); this.fireTime = firedBundle.getFireTime(); this.scheduledFireTime = firedBundle.getScheduledFireTime(); this.prevFireTime = firedBundle.getPrevFireTime(); this.nextFireTime = firedBundle.getNextFireTime(); this.jobDataMap = new JobDataMap(); this.jobDataMap.putAll(jobDetail.getJobDataMap()); this.jobDataMap.putAll(trigger.getJobDataMap()); }
/** * <p> * Create a JobExcecutionContext with the given context data. * </p> */ public JobExecutionContextImpl(Scheduler scheduler, TriggerFiredBundle firedBundle, Job job) { this.scheduler = scheduler; this.trigger = firedBundle.getTrigger(); this.calendar = firedBundle.getCalendar(); this.jobDetail = firedBundle.getJobDetail(); this.job = job; this.recovering = firedBundle.isRecovering(); this.fireTime = firedBundle.getFireTime(); this.scheduledFireTime = firedBundle.getScheduledFireTime(); this.prevFireTime = firedBundle.getPrevFireTime(); this.nextFireTime = firedBundle.getNextFireTime(); this.jobDataMap = new JobDataMap(); this.jobDataMap.putAll(jobDetail.getJobDataMap()); this.jobDataMap.putAll(trigger.getJobDataMap()); }
/** * <p> * Create a JobExcecutionContext with the given context data. * </p> */ public JobExecutionContextImpl(Scheduler scheduler, TriggerFiredBundle firedBundle, Job job) { this.scheduler = scheduler; this.trigger = firedBundle.getTrigger(); this.calendar = firedBundle.getCalendar(); this.jobDetail = firedBundle.getJobDetail(); this.job = job; this.recovering = firedBundle.isRecovering(); this.fireTime = firedBundle.getFireTime(); this.scheduledFireTime = firedBundle.getScheduledFireTime(); this.prevFireTime = firedBundle.getPrevFireTime(); this.nextFireTime = firedBundle.getNextFireTime(); this.jobDataMap = new JobDataMap(); this.jobDataMap.putAll(jobDetail.getJobDataMap()); this.jobDataMap.putAll(trigger.getJobDataMap()); }