當前位置: 首頁>>代碼示例>>Java>>正文


Java JobExecution.setStartTime方法代碼示例

本文整理匯總了Java中org.springframework.batch.core.JobExecution.setStartTime方法的典型用法代碼示例。如果您正苦於以下問題:Java JobExecution.setStartTime方法的具體用法?Java JobExecution.setStartTime怎麽用?Java JobExecution.setStartTime使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.springframework.batch.core.JobExecution的用法示例。


在下文中一共展示了JobExecution.setStartTime方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: mapRow

import org.springframework.batch.core.JobExecution; //導入方法依賴的package包/類
/**
 * @param resultSet Set the result set
 * @param rowNumber Set the row number
 * @throws SQLException if there is a problem
 * @return a job execution instance
 */
public final JobExecution mapRow(final ResultSet resultSet,
		final int rowNumber) throws SQLException {
	JobInstance jobInstance = new JobInstance(resultSet.getBigDecimal(
			"JOB_INSTANCE_ID").longValue(),
			new JobParameters(), resultSet.getString("JOB_NAME"));
	JobExecution jobExecution = new JobExecution(jobInstance,
			resultSet.getBigDecimal("JOB_EXECUTION_ID").longValue());
	jobExecution.setStartTime(resultSet.getTimestamp("START_TIME"));
	jobExecution.setCreateTime(resultSet.getTimestamp("CREATE_TIME"));
	jobExecution.setEndTime(resultSet.getTimestamp("END_TIME"));
	jobExecution.setStatus(BatchStatus.valueOf(resultSet
			.getString("STATUS")));
	ExitStatus exitStatus = new ExitStatus(
			resultSet.getString("EXIT_CODE"),
			resultSet.getString("EXIT_MESSAGE"));
	jobExecution.setExitStatus(exitStatus);
	return jobExecution;
}
 
開發者ID:RBGKew,項目名稱:eMonocot,代碼行數:25,代碼來源:JobExecutionDaoImpl.java

示例2: onSetUp

import org.springframework.batch.core.JobExecution; //導入方法依賴的package包/類
@Before
public void onSetUp() throws Exception {
    jobParameters = new JobParameters();
    jobInstance = new JobInstance(12345L, "execJob");
    execution = new JobExecution(jobInstance, new JobParameters());
    execution.setStartTime(new Date(System.currentTimeMillis()));
    execution.setLastUpdated(new Date(System.currentTimeMillis()));
    execution.setEndTime(new Date(System.currentTimeMillis()));
    jobExecutionDao = new MarkLogicJobExecutionDao(getClient(), getBatchProperties());
}
 
開發者ID:marklogic-community,項目名稱:marklogic-spring-batch,代碼行數:11,代碼來源:MarkLogicJobExecutionDaoTests.java

示例3: createJobExecution

import org.springframework.batch.core.JobExecution; //導入方法依賴的package包/類
private void createJobExecution(String name, BatchStatus status) {
	TaskExecution taskExecution = this.dao.createTaskExecution(name, new Date(), new ArrayList<>(), null);
	JobExecution jobExecution = this.jobRepository.createJobExecution(this.jobRepository.createJobInstance(name, new JobParameters()), new JobParameters(), null);
	this.taskBatchDao.saveRelationship(taskExecution, jobExecution);
	jobExecution.setStatus(status);
	jobExecution.setStartTime(new Date());
	this.jobRepository.update(jobExecution);
}
 
開發者ID:spring-cloud,項目名稱:spring-cloud-dataflow,代碼行數:9,代碼來源:JobInstancesDocumentation.java

示例4: createJobExecution

import org.springframework.batch.core.JobExecution; //導入方法依賴的package包/類
private void createJobExecution(String name, BatchStatus status) {
	TaskExecution taskExecution = this.dao.createTaskExecution(name, new Date(), new ArrayList<>(), null);
	JobExecution jobExecution = this.jobRepository.createJobExecution(this.jobRepository.createJobInstance(name, new JobParameters()), new JobParameters(), null);
	StepExecution stepExecution = new StepExecution(name + "_STEP", jobExecution, jobExecution.getId());
	stepExecution.setId(null);
	jobRepository.add(stepExecution);
	this.taskBatchDao.saveRelationship(taskExecution, jobExecution);
	jobExecution.setStatus(status);
	jobExecution.setStartTime(new Date());
	this.jobRepository.update(jobExecution);
}
 
開發者ID:spring-cloud,項目名稱:spring-cloud-dataflow,代碼行數:12,代碼來源:JobStepExecutionsDocumentation.java

示例5: unmarshal

import org.springframework.batch.core.JobExecution; //導入方法依賴的package包/類
@Override
public JobExecution unmarshal(AdaptedJobExecution v) throws Exception {
	JobExecution jobExec = new JobExecution(v.getId(), v.getJobParameters());
	jobExec.setJobInstance(v.getJobInstance());
	jobExec.setCreateTime(v.getCreateDateTime());
	jobExec.setEndTime(v.getEndDateTime());
	jobExec.setLastUpdated(v.getLastUpdatedDateTime());
	jobExec.setStartTime(v.getStartDateTime());
	jobExec.setStatus(BatchStatus.valueOf(v.getStatus()));
	jobExec.setExitStatus(new ExitStatus(v.getExitCode(), ""));
	jobExec.addStepExecutions(v.getStepExecutions());
	jobExec.setVersion(v.getVersion());
	jobExec.setExecutionContext(v.getExecutionContext());
	return jobExec;
}
 
開發者ID:marklogic-community,項目名稱:marklogic-spring-batch,代碼行數:16,代碼來源:JobExecutionAdapter.java


注:本文中的org.springframework.batch.core.JobExecution.setStartTime方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。