本文整理匯總了Java中org.springframework.batch.core.JobExecution.getEndTime方法的典型用法代碼示例。如果您正苦於以下問題:Java JobExecution.getEndTime方法的具體用法?Java JobExecution.getEndTime怎麽用?Java JobExecution.getEndTime使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.springframework.batch.core.JobExecution
的用法示例。
在下文中一共展示了JobExecution.getEndTime方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: JobExecutionInfo
import org.springframework.batch.core.JobExecution; //導入方法依賴的package包/類
public JobExecutionInfo(JobExecution jobExecution, String baseUrl) {
resourceIdentifier = jobExecution.getJobInstance().getJobParameters().getString("resource.identifier");
DateTime sTime = new DateTime(jobExecution.getStartTime());
DateTime eTime = new DateTime(jobExecution.getEndTime());
duration = eTime.minus(sTime.getMillis());
startTime = sTime;
exitDescription = jobExecution.getExitStatus().getExitDescription();
exitCode = jobExecution.getExitStatus().getExitCode();
id = jobExecution.getId();
jobInstance = baseUrl + "/jobs/" + jobExecution.getJobInstance().getJobName() + "/" + jobExecution.getJobInstance().getId();
resource = baseUrl + "/jobs/executions/" + jobExecution.getId();
this.baseUrl = baseUrl;
status = jobExecution.getStatus();
Integer writeSkip = 0;
for (StepExecution stepExecution : jobExecution.getStepExecutions()) {
recordsRead += stepExecution.getReadCount();
readSkip += stepExecution.getReadSkipCount();
processSkip += stepExecution.getProcessSkipCount();
written += stepExecution.getWriteCount();
writeSkip += stepExecution.getWriteSkipCount();
}
}
示例2: AdaptedJobExecution
import org.springframework.batch.core.JobExecution; //導入方法依賴的package包/類
public AdaptedJobExecution(JobExecution jobExecution) {
this.id = jobExecution.getId();
if (jobExecution.getVersion() == null) {
jobExecution.setVersion(0);
} else {
this.version = jobExecution.getVersion();
}
this.jobInstance = jobExecution.getJobInstance();
this.jobParameters = jobExecution.getJobParameters();
this.createDateTime = jobExecution.getCreateTime();
this.endDateTime = jobExecution.getEndTime();
this.lastUpdatedDateTime = jobExecution.getLastUpdated();
this.startDateTime = jobExecution.getStartTime();
if (jobExecution.getStatus() == null) {
this.status = BatchStatus.STARTING.toString();
} else {
this.status = jobExecution.getStatus().toString();
}
this.exitStatus = jobExecution.getExitStatus().toString();
for (StepExecution step : jobExecution.getStepExecutions()) {
stepExecutions.add(step);
}
this.executionContext = jobExecution.getExecutionContext();
}
示例3: JobExecutionInfo
import org.springframework.batch.core.JobExecution; //導入方法依賴的package包/類
public JobExecutionInfo(JobExecution jobExecution) {
DateTime sTime = new DateTime(jobExecution.getStartTime());
DateTime eTime = new DateTime(jobExecution.getEndTime());
duration = eTime.minus(sTime.getMillis());
startTime = sTime;
exitDescription = jobExecution.getExitStatus().getExitDescription();
exitCode = jobExecution.getExitStatus().getExitCode();
id = jobExecution.getId();
status = jobExecution.getStatus();
jobConfigurationId = jobExecution.getJobParameters().getString("job.configuration.id");
Integer writeSkip = 0;
for (StepExecution stepExecution : jobExecution.getStepExecutions()) {
recordsRead += stepExecution.getReadCount();
readSkip += stepExecution.getReadSkipCount();
processSkip += stepExecution.getProcessSkipCount();
written += stepExecution.getWriteCount();
writeSkip += stepExecution.getWriteSkipCount();
}
}
示例4: JobExecutionEvent
import org.springframework.batch.core.JobExecution; //導入方法依賴的package包/類
/**
* Constructor for the StepExecution to initialize the DTO.
*
* @param original the StepExecution to build this DTO around.
*/
public JobExecutionEvent(JobExecution original) {
this.jobParameters = new JobParametersEvent(original.getJobParameters().getParameters());
this.jobInstance = new JobInstanceEvent(original.getJobInstance().getId(), original.getJobInstance().getJobName());
for(StepExecution stepExecution : original.getStepExecutions()){
stepExecutions.add(new StepExecutionEvent(stepExecution));
}
this.status = original.getStatus();
this.startTime = original.getStartTime();
this.createTime = original.getCreateTime();
this.endTime = original.getEndTime();
this.lastUpdated = original.getLastUpdated();
this.exitStatus = new ExitStatus(original.getExitStatus());
this.executionContext = original.getExecutionContext();
this.failureExceptions = original.getFailureExceptions();
this.jobConfigurationName = original.getJobConfigurationName();
this.setId(original.getId());
this.setVersion(original.getVersion());
}