Uses of Class
org.springframework.batch.core.StepExecution
Package
Description
Core domain context for Spring Batch covering jobs, steps, configuration and execution
abstractions.
Interfaces and related classes to support meta data browsing.
Specific implementations of explorer concerns.
Specific implementations of job concerns.
Flow related constructs including Flow interface, executors, and related exceptions
Basic implementations of flow constructs
Generic implementations of core batch listener interfaces.
This package contains APIs related to batch observability.
Interfaces for partitioning components.
Implementation of common partition components.
Interfaces and generic implementations of repository concerns.
Specific implementations of dao concerns.
Specific implementations of repository concerns.
Implementation of the contexts for each of the custom bean scopes in Spring Batch (Job
and Step).
Specific implementations of step concerns.
Specific implementations of step concerns for item-oriented approach.
JobStep
and related components.Interfaces and generic implementations of tasklet concerns.
Components for remote chunking.
Remote partitioning components.
Support classes related to steps when used with Spring Integration.
Utility classes for batch job/step testing.
-
Uses of StepExecution in org.springframework.batch.core
Modifier and TypeMethodDescriptionJobExecution.createStepExecution
(String stepName) Register a step execution with the current job execution.StepContribution.getStepExecution()
Public getter for the parent step execution of this contribution.Modifier and TypeMethodDescriptionJobExecution.getStepExecutions()
Accessor for the step executions.Modifier and TypeMethodDescriptiondefault ExitStatus
StepExecutionListener.afterStep
(StepExecution stepExecution) Give a listener a chance to modify the exit status from a step.default void
StepExecutionListener.beforeStep
(StepExecution stepExecution) Initialize the state of the listener with theStepExecution
from the current scope.void
Step.execute
(StepExecution stepExecution) Process the step and assign progress and status meta information to theStepExecution
provided.Modifier and TypeMethodDescriptionvoid
JobExecution.addStepExecutions
(List<StepExecution> stepExecutions) Add some step executions. -
Uses of StepExecution in org.springframework.batch.core.explore
Modifier and TypeMethodDescriptionJobExplorer.getStepExecution
(Long jobExecutionId, Long stepExecutionId) Retrieve aStepExecution
by its ID and parentJobExecution
ID. -
Uses of StepExecution in org.springframework.batch.core.explore.support
Modifier and TypeMethodDescriptionSimpleJobExplorer.getStepExecution
(Long jobExecutionId, Long executionId) -
Uses of StepExecution in org.springframework.batch.core.job
Modifier and TypeMethodDescriptionprotected final StepExecution
AbstractJob.handleStep
(Step step, JobExecution execution) Convenience method for subclasses to delegate the handling of a specific step in the context of the currentJobExecution
.SimpleStepHandler.handleStep
(Step step, JobExecution execution) StepHandler.handleStep
(Step step, JobExecution jobExecution) Handle a step and return the execution for it.Modifier and TypeMethodDescriptionprotected boolean
SimpleStepHandler.shouldStart
(StepExecution lastStepExecution, JobExecution jobExecution, Step step) Given a step and configuration, return true if the step should start, false if it should not, and throw an exception if the job should finish. -
Uses of StepExecution in org.springframework.batch.core.job.flow
Modifier and TypeMethodDescriptionFlowExecutor.getStepExecution()
JobFlowExecutor.getStepExecution()
Modifier and TypeMethodDescriptionJobExecutionDecider.decide
(JobExecution jobExecution, StepExecution stepExecution) Strategy for branching an execution based on the state of an ongoingJobExecution
.protected void
FlowStep.doExecute
(StepExecution stepExecution) Delegate to the flow provided for the execution of the step. -
Uses of StepExecution in org.springframework.batch.core.job.flow.support
Modifier and TypeMethodDescriptionprotected boolean
SimpleFlow.isFlowContinued
(State state, FlowExecutionStatus status, StepExecution stepExecution) protected State
SimpleFlow.nextState
(String stateName, FlowExecutionStatus status, StepExecution stepExecution) -
Uses of StepExecution in org.springframework.batch.core.listener
Modifier and TypeMethodDescriptionCompositeStepExecutionListener.afterStep
(StepExecution stepExecution) Call the registered listeners in reverse order, respecting and prioritizing those that implementOrdered
.ExecutionContextPromotionListener.afterStep
(StepExecution stepExecution) MulticasterBatchListener.afterStep
(StepExecution stepExecution) StepExecutionListenerSupport.afterStep
(StepExecution stepExecution) Deprecated.void
CompositeStepExecutionListener.beforeStep
(StepExecution stepExecution) Call the registered listeners in order, respecting and prioritizing those that implementOrdered
.void
JobParameterExecutionContextCopyListener.beforeStep
(StepExecution stepExecution) void
MulticasterBatchListener.beforeStep
(StepExecution stepExecution) void
StepExecutionListenerSupport.beforeStep
(StepExecution stepExecution) Deprecated. -
Uses of StepExecution in org.springframework.batch.core.observability
-
Uses of StepExecution in org.springframework.batch.core.partition
Modifier and TypeMethodDescriptionPartitionHandler.handle
(StepExecutionSplitter stepSplitter, StepExecution stepExecution) Main entry point forPartitionHandler
interface.StepExecutionSplitter.split
(StepExecution stepExecution, int gridSize) Partition the providedStepExecution
into a set of parallel executable instances with the same parentJobExecution
.Modifier and TypeMethodDescriptionPartitionHandler.handle
(StepExecutionSplitter stepSplitter, StepExecution stepExecution) Main entry point forPartitionHandler
interface.StepExecutionSplitter.split
(StepExecution stepExecution, int gridSize) Partition the providedStepExecution
into a set of parallel executable instances with the same parentJobExecution
. -
Uses of StepExecution in org.springframework.batch.core.partition.support
Modifier and TypeMethodDescriptionprotected FutureTask<StepExecution>
TaskExecutorPartitionHandler.createTask
(Step step, StepExecution stepExecution) Creates the task executing the given step in the context of the given execution.protected abstract Set<StepExecution>
AbstractPartitionHandler.doHandle
(StepExecution managerStepExecution, Set<StepExecution> partitionStepExecutions) Executes the specifiedStepExecution
instances and returns an updated view of them.protected Set<StepExecution>
TaskExecutorPartitionHandler.doHandle
(StepExecution managerStepExecution, Set<StepExecution> partitionStepExecutions) AbstractPartitionHandler.handle
(StepExecutionSplitter stepSplitter, StepExecution managerStepExecution) SimpleStepExecutionSplitter.split
(StepExecution stepExecution, int gridSize) Modifier and TypeMethodDescriptionvoid
DefaultStepExecutionAggregator.aggregate
(StepExecution result, Collection<StepExecution> executions) Aggregates the input executions into the resultStepExecution
.void
RemoteStepExecutionAggregator.aggregate
(StepExecution result, Collection<StepExecution> executions) Aggregates the input executions into the resultStepExecution
delegating to the delegate aggregator once the input has been refreshed from theJobExplorer
.void
StepExecutionAggregator.aggregate
(StepExecution result, Collection<StepExecution> executions) Take the inputs and aggregate, putting the aggregates into the result.protected FutureTask<StepExecution>
TaskExecutorPartitionHandler.createTask
(Step step, StepExecution stepExecution) Creates the task executing the given step in the context of the given execution.protected void
PartitionStep.doExecute
(StepExecution stepExecution) Delegate execution to thePartitionHandler
provided.protected abstract Set<StepExecution>
AbstractPartitionHandler.doHandle
(StepExecution managerStepExecution, Set<StepExecution> partitionStepExecutions) Executes the specifiedStepExecution
instances and returns an updated view of them.protected Set<StepExecution>
TaskExecutorPartitionHandler.doHandle
(StepExecution managerStepExecution, Set<StepExecution> partitionStepExecutions) AbstractPartitionHandler.handle
(StepExecutionSplitter stepSplitter, StepExecution managerStepExecution) protected boolean
SimpleStepExecutionSplitter.isStartable
(StepExecution stepExecution, ExecutionContext context) Check if a step execution is startable.SimpleStepExecutionSplitter.split
(StepExecution stepExecution, int gridSize) Modifier and TypeMethodDescriptionvoid
DefaultStepExecutionAggregator.aggregate
(StepExecution result, Collection<StepExecution> executions) Aggregates the input executions into the resultStepExecution
.void
RemoteStepExecutionAggregator.aggregate
(StepExecution result, Collection<StepExecution> executions) Aggregates the input executions into the resultStepExecution
delegating to the delegate aggregator once the input has been refreshed from theJobExplorer
.void
StepExecutionAggregator.aggregate
(StepExecution result, Collection<StepExecution> executions) Take the inputs and aggregate, putting the aggregates into the result.protected abstract Set<StepExecution>
AbstractPartitionHandler.doHandle
(StepExecution managerStepExecution, Set<StepExecution> partitionStepExecutions) Executes the specifiedStepExecution
instances and returns an updated view of them.protected Set<StepExecution>
TaskExecutorPartitionHandler.doHandle
(StepExecution managerStepExecution, Set<StepExecution> partitionStepExecutions) -
Uses of StepExecution in org.springframework.batch.core.repository
Modifier and TypeMethodDescriptionJobRepository.getLastStepExecution
(JobInstance jobInstance, String stepName) Modifier and TypeMethodDescriptionvoid
JobRepository.add
(StepExecution stepExecution) Save theStepExecution
and itsExecutionContext
.default void
JobRepository.deleteStepExecution
(StepExecution stepExecution) Delete the step execution along with its execution context.void
JobRepository.update
(StepExecution stepExecution) Update theStepExecution
(but not itsExecutionContext
).void
JobRepository.updateExecutionContext
(StepExecution stepExecution) Persist the updatedExecutionContext
s of the givenStepExecution
.Modifier and TypeMethodDescriptionvoid
JobRepository.addAll
(Collection<StepExecution> stepExecutions) Save a collection ofStepExecution
s and eachExecutionContext
. -
Uses of StepExecution in org.springframework.batch.core.repository.dao
Modifier and TypeMethodDescriptionJdbcStepExecutionDao.getLastStepExecution
(JobInstance jobInstance, String stepName) default StepExecution
StepExecutionDao.getLastStepExecution
(JobInstance jobInstance, String stepName) Retrieve the lastStepExecution
for a givenJobInstance
ordered by creation time and then id.JdbcStepExecutionDao.getStepExecution
(JobExecution jobExecution, Long stepExecutionId) StepExecutionDao.getStepExecution
(JobExecution jobExecution, Long stepExecutionId) Retrieve aStepExecution
from its id.Modifier and TypeMethodDescriptiondefault void
ExecutionContextDao.deleteExecutionContext
(StepExecution stepExecution) Delete the execution context of the givenStepExecution
.void
JdbcExecutionContextDao.deleteExecutionContext
(StepExecution stepExecution) Delete the execution context of the givenStepExecution
.void
JdbcStepExecutionDao.deleteStepExecution
(StepExecution stepExecution) Delete the given step execution.default void
StepExecutionDao.deleteStepExecution
(StepExecution stepExecution) Delete the given step execution.ExecutionContextDao.getExecutionContext
(StepExecution stepExecution) JdbcExecutionContextDao.getExecutionContext
(StepExecution stepExecution) void
ExecutionContextDao.saveExecutionContext
(StepExecution stepExecution) Persist the execution context associated with the given stepExecution, persistent entry for the context should not exist yet.void
JdbcExecutionContextDao.saveExecutionContext
(StepExecution stepExecution) void
JdbcStepExecutionDao.saveStepExecution
(StepExecution stepExecution) Save a StepExecution.void
StepExecutionDao.saveStepExecution
(StepExecution stepExecution) Save the given StepExecution.void
ExecutionContextDao.updateExecutionContext
(StepExecution stepExecution) Persist the updates of execution context associated with the given stepExecution.void
JdbcExecutionContextDao.updateExecutionContext
(StepExecution stepExecution) void
JdbcStepExecutionDao.updateStepExecution
(StepExecution stepExecution) void
StepExecutionDao.updateStepExecution
(StepExecution stepExecution) Update the given StepExecutionModifier and TypeMethodDescriptionvoid
ExecutionContextDao.saveExecutionContexts
(Collection<StepExecution> stepExecutions) Persist the execution context associated with each stepExecution in a given collection, persistent entry for the context should not exist yet.void
JdbcExecutionContextDao.saveExecutionContexts
(Collection<StepExecution> stepExecutions) void
JdbcStepExecutionDao.saveStepExecutions
(Collection<StepExecution> stepExecutions) Batch insert StepExecutionsvoid
StepExecutionDao.saveStepExecutions
(Collection<StepExecution> stepExecutions) Save the given collection of StepExecution as a batch. -
Uses of StepExecution in org.springframework.batch.core.repository.support
Modifier and TypeMethodDescriptionSimpleJobRepository.getLastStepExecution
(JobInstance jobInstance, String stepName) Modifier and TypeMethodDescriptionvoid
SimpleJobRepository.add
(StepExecution stepExecution) void
SimpleJobRepository.deleteStepExecution
(StepExecution stepExecution) void
SimpleJobRepository.update
(StepExecution stepExecution) void
SimpleJobRepository.updateExecutionContext
(StepExecution stepExecution) Modifier and TypeMethodDescriptionvoid
SimpleJobRepository.addAll
(Collection<StepExecution> stepExecutions) -
Uses of StepExecution in org.springframework.batch.core.resource
Modifier and TypeMethodDescriptionvoid
StepExecutionSimpleCompletionPolicy.beforeStep
(StepExecution stepExecution) Set up aSimpleCompletionPolicy
with a commit interval taken from theJobParameters
. -
Uses of StepExecution in org.springframework.batch.core.scope.context
Modifier and TypeMethodDescriptionStepContext.getStepExecution()
The currentStepExecution
that is active in this context.Modifier and TypeMethodDescriptionvoid
StepScopeManager.execute
(Step step, StepExecution stepExecution) static StepContext
StepSynchronizationManager.register
(StepExecution stepExecution) Register a context with the current thread - always put a matchingStepSynchronizationManager.close()
call in a finally block to ensure that the correct context is available in the enclosing block.ModifierConstructorDescriptionStepContext
(StepExecution stepExecution) Create a new instance ofStepContext
for thisStepExecution
.StepContextRepeatCallback
(StepExecution stepExecution) -
Uses of StepExecution in org.springframework.batch.core.step
Modifier and TypeMethodDescriptionNoWorkFoundStepExecutionListener.afterStep
(StepExecution stepExecution) void
StepInterruptionPolicy.checkInterrupted
(StepExecution stepExecution) Has the job been interrupted? If so then throw aJobInterruptedException
.void
ThreadStepInterruptionPolicy.checkInterrupted
(StepExecution stepExecution) Returns if the current job lifecycle has been interrupted by checking if the current thread is interrupted.protected abstract void
AbstractStep.doExecute
(StepExecution stepExecution) Extension point for subclasses to execute business logic.protected void
AbstractStep.doExecutionRegistration
(StepExecution stepExecution) Registers theStepExecution
for property resolution viaStepScope
final void
AbstractStep.execute
(StepExecution stepExecution) Template method for step execution logic - calls abstract methods for resource initialization (AbstractStep.open(ExecutionContext)
), execution logic (AbstractStep.doExecute(StepExecution)
) and resource closing (AbstractStep.close(ExecutionContext)
). -
Uses of StepExecution in org.springframework.batch.core.step.item
Modifier and TypeMethodDescriptionprotected void
SimpleChunkProcessor.stopTimer
(io.micrometer.core.instrument.Timer.Sample sample, StepExecution stepExecution, String metricName, String status, String description) -
Uses of StepExecution in org.springframework.batch.core.step.job
Modifier and TypeMethodDescriptionprotected void
JobStep.doExecute
(StepExecution stepExecution) Execute the job provided by delegating to theJobLauncher
to prevent duplicate executions.DefaultJobParametersExtractor.getJobParameters
(Job job, StepExecution stepExecution) JobParametersExtractor.getJobParameters
(Job job, StepExecution stepExecution) Extract job parameters from the step execution, for example from the execution context or other properties. -
Uses of StepExecution in org.springframework.batch.core.step.tasklet
Modifier and TypeMethodDescriptionvoid
SystemCommandTasklet.beforeStep
(StepExecution stepExecution) Get a reference toStepExecution
for interrupt checks during system command execution.protected void
TaskletStep.doExecute
(StepExecution stepExecution) Process the step and update its context so that progress can be monitored by the caller. -
Uses of StepExecution in org.springframework.batch.integration.chunk
Modifier and TypeMethodDescriptionChunkMessageChannelItemWriter.afterStep
(StepExecution stepExecution) void
ChunkMessageChannelItemWriter.beforeStep
(StepExecution stepExecution) void
ChunkMessageChannelItemWriter.LocalState.setStepExecution
(StepExecution stepExecution) -
Uses of StepExecution in org.springframework.batch.integration.partition
Modifier and TypeMethodDescriptionStepExecutionRequestHandler.handle
(StepExecutionRequest request) Modifier and TypeMethodDescriptionprotected Set<StepExecution>
MessageChannelPartitionHandler.doHandle
(StepExecution managerStepExecution, Set<StepExecution> partitionStepExecutions) SendsStepExecutionRequest
objects to the request channel of theMessagingTemplate
, and then receives the result back as a list ofStepExecution
on a reply channel.Modifier and TypeMethodDescriptionprotected Set<StepExecution>
MessageChannelPartitionHandler.doHandle
(StepExecution managerStepExecution, Set<StepExecution> partitionStepExecutions) SendsStepExecutionRequest
objects to the request channel of theMessagingTemplate
, and then receives the result back as a list ofStepExecution
on a reply channel.Modifier and TypeMethodDescriptionprotected Set<StepExecution>
MessageChannelPartitionHandler.doHandle
(StepExecution managerStepExecution, Set<StepExecution> partitionStepExecutions) SendsStepExecutionRequest
objects to the request channel of theMessagingTemplate
, and then receives the result back as a list ofStepExecution
on a reply channel. -
Uses of StepExecution in org.springframework.batch.integration.step
Modifier and TypeMethodDescriptionprotected void
DelegateStep.doExecute
(StepExecution stepExecution) Deprecated, for removal: This API element is subject to removal in a future version. -
Uses of StepExecution in org.springframework.batch.test
Modifier and TypeMethodDescriptionstatic StepExecution
MetaDataInstanceFactory.createStepExecution()
Create aStepExecution
with default parameters.static StepExecution
MetaDataInstanceFactory.createStepExecution
(String stepName, Long executionId) Create aStepExecution
with the parameters provided.static StepExecution
MetaDataInstanceFactory.createStepExecution
(JobExecution jobExecution, String stepName, Long executionId) Create aStepExecution
with the parameters provided.static StepExecution
MetaDataInstanceFactory.createStepExecution
(JobParameters jobParameters) Create aStepExecution
and all its parent entities with default values, but using theJobParameters
provided.static StepExecution
MetaDataInstanceFactory.createStepExecution
(JobParameters jobParameters, ExecutionContext executionContext) Create aStepExecution
and all its parent entities with default values, but using theExecutionContext
andJobParameters
provided.static StepExecution
MetaDataInstanceFactory.createStepExecution
(ExecutionContext executionContext) Create aStepExecution
and all its parent entities with default values, but using theExecutionContext
provided.protected StepExecution
StepScopeTestExecutionListener.getStepExecution
(org.springframework.test.context.TestContext testContext) Discover aStepExecution
as a field in the test case or create one if none is available.Modifier and TypeMethodDescriptionstatic <T> T
StepScopeTestUtils.doInStepScope
(StepExecution stepExecution, Callable<T> callable) static <T> T
ExecutionContextTestUtils.getValueFromStep
(StepExecution stepExecution, String key)