Java Code Examples for org.springframework.batch.core.StepExecution#getStepName()
The following examples show how to use
org.springframework.batch.core.StepExecution#getStepName() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: StepExecutionEvent.java From spring-cloud-task with Apache License 2.0 | 5 votes |
/** * Constructor for the StepExecution to initialize the DTO. * @param stepExecution the StepExecution to build this DTO around. */ public StepExecutionEvent(StepExecution stepExecution) { super(); Assert.notNull(stepExecution, "StepExecution must be provided to re-hydrate an existing StepExecutionEvent"); Assert.notNull(stepExecution.getJobExecution(), "JobExecution must be provided to re-hydrate an existing StepExecutionEvent"); setId(stepExecution.getId()); this.jobExecutionId = stepExecution.getJobExecutionId(); this.stepName = stepExecution.getStepName(); this.status = stepExecution.getStatus(); this.exitStatus = new ExitStatus(stepExecution.getExitStatus()); this.executionContext = stepExecution.getExecutionContext(); for (Throwable throwable : stepExecution.getFailureExceptions()) { this.failureExceptions.add(throwable); } this.terminateOnly = stepExecution.isTerminateOnly(); this.endTime = stepExecution.getEndTime(); this.lastUpdated = stepExecution.getLastUpdated(); this.startTime = stepExecution.getStartTime(); this.commitCount = stepExecution.getCommitCount(); this.filterCount = stepExecution.getFilterCount(); this.processSkipCount = stepExecution.getProcessSkipCount(); this.readCount = stepExecution.getReadCount(); this.readSkipCount = stepExecution.getReadSkipCount(); this.rollbackCount = stepExecution.getRollbackCount(); this.writeCount = stepExecution.getWriteCount(); this.writeSkipCount = stepExecution.getWriteSkipCount(); }
Example 2
Source File: DeployerPartitionHandlerTests.java From spring-cloud-task with Apache License 2.0 | 5 votes |
private StepExecution getStepExecutionFinish(StepExecution stepExecutionStart, BatchStatus status) { StepExecution workerStepExecutionFinish = new StepExecution( stepExecutionStart.getStepName(), stepExecutionStart.getJobExecution()); workerStepExecutionFinish.setId(stepExecutionStart.getId()); workerStepExecutionFinish.setStatus(status); return workerStepExecutionFinish; }
Example 3
Source File: SingleJVMJobProgressListener.java From batchers with Apache License 2.0 | 5 votes |
@Override @BeforeStep public void beforeStep(StepExecution stepExecution) { totalItemCount = employeeService.getEmployeeCount().intValue(); jobStartParams = new JobStartParamsMapper().map(stepExecution.getJobParameters()); stepName = stepExecution.getStepName(); currentItemCount = new AtomicLong(); lastPercentageComplete = new AtomicInteger(); eventBus.post(new JobProgressEvent(jobStartParams, stepName, 0)); }
Example 4
Source File: SlaveJobProgressListener.java From batchers with Apache License 2.0 | 4 votes |
@Override @BeforeStep public void beforeStep(StepExecution stepExecution) { jobStartParams = new JobStartParamsMapper().map(stepExecution.getJobParameters()); stepName = stepExecution.getStepName(); }
Example 5
Source File: AbstractBatchMetricsAspect.java From spring-boot-starter-batch-web with Apache License 2.0 | 4 votes |
private String getStepIdentifier() { StepContext stepContext = StepSynchronizationManager.getContext(); StepExecution stepExecution = StepSynchronizationManager.getContext().getStepExecution(); return stepContext.getJobName() + "." + stepExecution.getStepName(); }
Example 6
Source File: MetricsListener.java From spring-boot-starter-batch-web with Apache License 2.0 | 4 votes |
private String getStepExecutionIdentifier(StepExecution stepExecution) { return stepExecution.getJobExecution().getJobInstance().getJobName() + "." + stepExecution.getStepName(); }
Example 7
Source File: BaseStepExecutionListener.java From spring-boot-doma2-sample with Apache License 2.0 | 2 votes |
/** * ステップ開始時にログを出力します。 * * @param context * @param stepExecution */ protected void logBeforeStep(BatchContext context, StepExecution stepExecution) { String stepName = stepExecution.getStepName(); log.info("Step:{} ---- START ----", stepName); }
Example 8
Source File: BaseStepExecutionListener.java From spring-boot-doma2-sample with Apache License 2.0 | 2 votes |
/** * ステップ終了時にログを出力します。 * * @param context * @param stepExecution */ protected void logAfterStep(BatchContext context, StepExecution stepExecution) { String stepName = stepExecution.getStepName(); log.info("Step:{} ---- END ----", stepName); }