/** * <p> * Retrieve the identified <code>int</code> value from the <code>JobDataMap</code>. * </p> * * @throws ClassCastException * if the identified object is not a String or Integer. */ public int getIntValue(String key) { Object obj = get(key); if(obj instanceof String) { return getIntFromString(key); } else { return getInt(key); } }
@Override public void execute(final JobExecutionContext context) { final JobDataMap data = context.getMergedJobDataMap(); final int projectId = data.getInt(PROJECT_ID); final Project project = this.projectManager.getProject(projectId); final String flowId = data.getString(FLOW_ID); final int flowVersion = data.getInt(FLOW_VERSION); final String submitUser = data.getString(SUBMIT_USER); final FlowTrigger flowTrigger = (FlowTrigger) data.get(FLOW_TRIGGER); this.triggerService.startTrigger(flowTrigger, flowId, flowVersion, submitUser, project); } }
final int projectId = jobDataMap.getInt(FlowTriggerQuartzJob.PROJECT_ID); final FlowTrigger flowTrigger = (FlowTrigger) jobDataMap .get(FlowTriggerQuartzJob.FLOW_TRIGGER);
/** * <p> * Retrieve the identified <code>int</code> value from the <code>JobDataMap</code>. * </p> * * @throws ClassCastException * if the identified object is not a String or Integer. */ public int getIntValue(String key) { Object obj = get(key); if(obj instanceof String) { return getIntFromString(key); } else { return getInt(key); } }
final int ackMode = dataMap.getInt(JmsHelper.JMS_ACK_MODE);
/** * <p> * Retrieve the identified <code>int</code> value from the <code>JobDataMap</code>. * </p> * * @throws ClassCastException * if the identified object is not a String or Integer. */ public int getIntValue(String key) { Object obj = get(key); if(obj instanceof String) { return getIntFromString(key); } else { return getInt(key); } }
final int ackMode = dataMap.getInt(JmsHelper.JMS_ACK_MODE);
/** * <p> * Retrieve the identified <code>int</code> value from the <code>JobDataMap</code>. * </p> * * @throws ClassCastException * if the identified object is not a String or Integer. */ public int getIntValue(String key) { Object obj = get(key); if(obj instanceof String) { return getIntFromString(key); } else { return getInt(key); } }
final int ackMode = dataMap.getInt(JmsHelper.JMS_ACK_MODE);
private BundleDeploymentCriteria getCriteriaFromContext(JobExecutionContext context) { int bundleDeploymentId = context.getJobDetail().getJobDataMap().getInt(BUNDLE_DEPLOYMENT_ID_KEY); BundleDeploymentCriteria crit = new BundleDeploymentCriteria(); crit.addFilterId(bundleDeploymentId); return crit; } }
private static SqlTimeBasedQuartzMonitor extractMonitor(JobExecutionContext jobExecutionContext) throws JobExecutionException { int index = jobExecutionContext.getMergedJobDataMap().getInt(sqlTimeBasedMonitorsIndexKey); SqlTimeBasedQuartzMonitor monitor; synchronized (sqlTimeBasedMonitors) { if (index < sqlTimeBasedMonitors.size()) { monitor = sqlTimeBasedMonitors.get(index); } else { throw new JobExecutionException("each scheduler of a quartz cluster should have identical hades " + "configuration; for example monitors should be identical, but this is not the case: " + "there is a scheduler with more monitors (at least " + (index + 1) + " monitor(s)) than this " + "scheduler (" + sqlTimeBasedMonitors.size() + " monitor(s))"); } } logger.info("monitor at index " + index + ": " + monitor); return monitor; }
int batchSize = jobData.getInt(JOB_DATA_KEY_BATCH_SIZE); String keyspace = jobData.getString(JOB_DATA_KEY_KEYSPACE); String columnFamily = jobData.getString(JOB_DATA_KEY_COLUMN_FAMILY);
@Override protected void executeInternal(final JobExecutionContext arg0) { // Extract the job data to execute the operation final int schedule = arg0.getMergedJobDataMap().getInt("schedule"); final ApplicationContext context = ObjectUtils.defaultIfNull((ApplicationContext) arg0.getMergedJobDataMap().get("context"), SpringUtils.getApplicationContext()); final VmSchedule entity = context.getBean(VmScheduleRepository.class).findOneExpected(schedule); log.info("Executing {} for schedule {}, subscription {}", entity.getOperation(), entity.getId(), entity.getSubscription().getId()); // Set the user context.getBean(SecurityHelper.class).setUserName(SecurityHelper.SYSTEM_USERNAME); // Execute the operation context.getBean(VmExecutionResource.class).execute(entity.getSubscription(), entity.getOperation()); log.info("Succeed {} for schedule {}, subscription {}", entity.getOperation(), entity.getId(), entity.getSubscription().getId()); }
final int ackMode = dataMap.getInt(JmsHelper.JMS_ACK_MODE);
String localeStr = dataMap.getString(LOCALE); String[] doNotDeleteUntilExtract = new String[4]; int cnt = dataMap.getInt("count"); DatasetBean datasetBean = null; if (localeStr != null) { int userAccountId = dataMap.getInt(USER_ID); int studyId = dataMap.getInt(STUDY_ID); String outputPath = dataMap.getString(POST_FILE_PATH); int dsId = dataMap.getInt(DATASET_ID);
final int ackMode = dataMap.getInt(JmsHelper.JMS_ACK_MODE);
int ackMode = jobDataMap.getInt(JmsHelper.JMS_ACK_MODE); session = conn.createQueueSession(useTransactions, ackMode); String queueName = jobDataMap.getString(JmsHelper.JMS_DESTINATION_JNDI);
int ackMode = jobDataMap.getInt(JmsHelper.JMS_ACK_MODE); session = conn.createQueueSession(useTransactions, ackMode); String queueName = jobDataMap.getString(JmsHelper.JMS_DESTINATION_JNDI);