Uses of Class
org.springframework.batch.core.JobExecution
Package
Description
Core domain context for Spring Batch covering jobs, steps, configuration and execution
abstractions.
Specific implementations of configuration concerns.
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
Interfaces and simple implementations of launch concerns.
Support classes for use in bootstrap and launch implementations or configurations.
Generic implementations of core batch listener interfaces.
This package contains APIs related to batch observability.
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).
Message based job launching components.
Utility classes for batch job/step testing.
-
Uses of JobExecution in org.springframework.batch.core
Modifier and TypeMethodDescriptionStepExecution.getJobExecution()
Accessor for the execution context information of the enclosing job.Modifier and TypeMethodDescriptiondefault void
JobExecutionListener.afterJob
(JobExecution jobExecution) Callback after completion of a job.default void
JobExecutionListener.beforeJob
(JobExecution jobExecution) Callback before a job executes.void
Job.execute
(JobExecution execution) Run theJobExecution
and update the meta information, such as status and statistics, as necessary.ModifierConstructorDescriptionJobExecution
(JobExecution original) Constructor that sets the state of the instance to theJobExecution
parameter.StepExecution
(String stepName, JobExecution jobExecution) Constructor that substitutes null for the execution ID.StepExecution
(String stepName, JobExecution jobExecution, Long id) Constructor with mandatory properties. -
Uses of JobExecution in org.springframework.batch.core.configuration.support
-
Uses of JobExecution in org.springframework.batch.core.explore
Modifier and TypeMethodDescriptionJobExplorer.getJobExecution
(Long executionId) Retrieve aJobExecution
by its ID.default JobExecution
JobExplorer.getLastJobExecution
(JobInstance jobInstance) Find the lastJobExecution
that has been created for a givenJobInstance
.Modifier and TypeMethodDescriptionJobExplorer.findRunningJobExecutions
(String jobName) Retrieve running job executions.JobExplorer.getJobExecutions
(JobInstance jobInstance) Retrieve job executions by their job instance. -
Uses of JobExecution in org.springframework.batch.core.explore.support
Modifier and TypeMethodDescriptionSimpleJobExplorer.getJobExecution
(Long executionId) SimpleJobExplorer.getLastJobExecution
(JobInstance jobInstance) Modifier and TypeMethodDescriptionSimpleJobExplorer.findRunningJobExecutions
(String jobName) SimpleJobExplorer.getJobExecutions
(JobInstance jobInstance) -
Uses of JobExecution in org.springframework.batch.core.job
Modifier and TypeMethodDescriptionprotected abstract void
AbstractJob.doExecute
(JobExecution execution) Extension point for subclasses allowing them to concentrate on processing logic and ignore listeners and repository calls.protected void
SimpleJob.doExecute
(JobExecution execution) Handler of steps sequentially as provided, checking each one for success before moving to the next.final void
AbstractJob.execute
(JobExecution execution) Run the specified job, handling all listener and repository calls, and delegating the actual processing toAbstractJob.doExecute(JobExecution)
.protected ExitStatus
AbstractJob.getDefaultExitStatusForFailure
(Throwable ex, JobExecution execution) Default mapping from throwable toExitStatus
.protected 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.protected 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 JobExecution in org.springframework.batch.core.job.flow
Modifier and TypeMethodDescriptionFlowExecutor.getJobExecution()
JobFlowExecutor.getJobExecution()
Modifier and TypeMethodDescriptionJobExecutionDecider.decide
(JobExecution jobExecution, StepExecution stepExecution) Strategy for branching an execution based on the state of an ongoingJobExecution
.protected void
FlowJob.doExecute
(JobExecution execution) ModifierConstructorDescriptionJobFlowExecutor
(JobRepository jobRepository, StepHandler stepHandler, JobExecution execution) -
Uses of JobExecution in org.springframework.batch.core.launch
Modifier and TypeMethodDescriptionJobOperator.abandon
(long jobExecutionId) Mark theJobExecution
as ABANDONED.JobLauncher.run
(Job job, JobParameters jobParameters) Start a job execution for the givenJob
andJobParameters
. -
Uses of JobExecution in org.springframework.batch.core.launch.support
Modifier and TypeMethodDescriptionSimpleJobOperator.abandon
(long jobExecutionId) SimpleJobLauncher.run
(Job job, JobParameters jobParameters) Deprecated, for removal: This API element is subject to removal in a future version.Run the provided job with the givenJobParameters
.TaskExecutorJobLauncher.run
(Job job, JobParameters jobParameters) -
Uses of JobExecution in org.springframework.batch.core.listener
Modifier and TypeMethodDescriptionvoid
CompositeJobExecutionListener.afterJob
(JobExecution jobExecution) Call the registered listeners in reverse order, respecting and prioritising those that implementOrdered
.void
JobExecutionListenerSupport.afterJob
(JobExecution jobExecution) Deprecated.void
CompositeJobExecutionListener.beforeJob
(JobExecution jobExecution) Call the registered listeners in order, respecting and prioritising those that implementOrdered
.void
JobExecutionListenerSupport.beforeJob
(JobExecution jobExecution) Deprecated. -
Uses of JobExecution in org.springframework.batch.core.observability
-
Uses of JobExecution in org.springframework.batch.core.repository
Modifier and TypeMethodDescriptionJobRepository.createJobExecution
(String jobName, JobParameters jobParameters) JobRepository.getLastJobExecution
(String jobName, JobParameters jobParameters) Modifier and TypeMethodDescriptiondefault List<JobExecution>
JobRepository.findJobExecutions
(JobInstance jobInstance) Return allJobExecution
s for givenJobInstance
, sorted backwards by creation order (so the first element is the most recent).Modifier and TypeMethodDescriptiondefault void
JobRepository.deleteJobExecution
(JobExecution jobExecution) Delete the job execution object graph (ie the job execution with its execution context, all related step executions and their executions contexts, as well as associated job parameters)void
JobRepository.update
(JobExecution jobExecution) Update theJobExecution
(but not itsExecutionContext
).void
JobRepository.updateExecutionContext
(JobExecution jobExecution) Persist the updatedExecutionContext
of the givenJobExecution
. -
Uses of JobExecution in org.springframework.batch.core.repository.dao
Modifier and TypeMethodDescriptionJdbcJobExecutionDao.getJobExecution
(Long executionId) JobExecutionDao.getJobExecution
(Long executionId) JdbcJobExecutionDao.getLastJobExecution
(JobInstance jobInstance) JobExecutionDao.getLastJobExecution
(JobInstance jobInstance) Find the lastJobExecution
to have been created for a givenJobInstance
.Modifier and TypeMethodDescriptionJdbcJobExecutionDao.findJobExecutions
(JobInstance job) JobExecutionDao.findJobExecutions
(JobInstance jobInstance) Return allJobExecution
s for givenJobInstance
, sorted backwards by creation order (so the first element is the most recent).JdbcJobExecutionDao.findRunningJobExecutions
(String jobName) JobExecutionDao.findRunningJobExecutions
(String jobName) Modifier and TypeMethodDescriptionvoid
JdbcStepExecutionDao.addStepExecutions
(JobExecution jobExecution) void
StepExecutionDao.addStepExecutions
(JobExecution jobExecution) Retrieve all theStepExecution
for the parentJobExecution
.default void
ExecutionContextDao.deleteExecutionContext
(JobExecution jobExecution) Delete the execution context of the givenJobExecution
.void
JdbcExecutionContextDao.deleteExecutionContext
(JobExecution jobExecution) Delete the execution context of the givenJobExecution
.void
JdbcJobExecutionDao.deleteJobExecution
(JobExecution jobExecution) Delete the given job execution.default void
JobExecutionDao.deleteJobExecution
(JobExecution jobExecution) Delete the given job execution.void
JdbcJobExecutionDao.deleteJobExecutionParameters
(JobExecution jobExecution) Delete the parameters associated with the given job execution.default void
JobExecutionDao.deleteJobExecutionParameters
(JobExecution jobExecution) Delete the parameters associated with the given job execution.ExecutionContextDao.getExecutionContext
(JobExecution jobExecution) JdbcExecutionContextDao.getExecutionContext
(JobExecution jobExecution) JdbcJobInstanceDao.getJobInstance
(JobExecution jobExecution) JobInstanceDao.getJobInstance
(JobExecution jobExecution) Fetch the JobInstance for the provided JobExecution.JdbcStepExecutionDao.getStepExecution
(JobExecution jobExecution, Long stepExecutionId) StepExecutionDao.getStepExecution
(JobExecution jobExecution, Long stepExecutionId) Retrieve aStepExecution
from its id.void
ExecutionContextDao.saveExecutionContext
(JobExecution jobExecution) Persist the execution context associated with the given jobExecution, persistent entry for the context should not exist yet.void
JdbcExecutionContextDao.saveExecutionContext
(JobExecution jobExecution) void
JdbcJobExecutionDao.saveJobExecution
(JobExecution jobExecution) SQL implementation using Sequences via the Spring incrementer abstraction.void
JobExecutionDao.saveJobExecution
(JobExecution jobExecution) Save a new JobExecution.void
JdbcJobExecutionDao.synchronizeStatus
(JobExecution jobExecution) void
JobExecutionDao.synchronizeStatus
(JobExecution jobExecution) Because it may be possible that the status of a JobExecution is updated while running, the following method will synchronize only the status and version fields.void
ExecutionContextDao.updateExecutionContext
(JobExecution jobExecution) Persist the updates of execution context associated with the given jobExecution.void
JdbcExecutionContextDao.updateExecutionContext
(JobExecution jobExecution) void
JdbcJobExecutionDao.updateJobExecution
(JobExecution jobExecution) Update given JobExecution using a SQL UPDATE statement.void
JobExecutionDao.updateJobExecution
(JobExecution jobExecution) Update and existing JobExecution. -
Uses of JobExecution in org.springframework.batch.core.repository.support
Modifier and TypeMethodDescriptionSimpleJobRepository.createJobExecution
(String jobName, JobParameters jobParameters) SimpleJobRepository.getLastJobExecution
(String jobName, JobParameters jobParameters) Modifier and TypeMethodDescriptionvoid
SimpleJobRepository.deleteJobExecution
(JobExecution jobExecution) void
SimpleJobRepository.update
(JobExecution jobExecution) void
SimpleJobRepository.updateExecutionContext
(JobExecution jobExecution) -
Uses of JobExecution in org.springframework.batch.core.scope.context
Modifier and TypeMethodDescriptionJobContext.getJobExecution()
The currentJobExecution
that is active in this context.Modifier and TypeMethodDescriptionvoid
JobScopeManager.execute
(Job job, JobExecution jobExecution) static JobContext
JobSynchronizationManager.register
(JobExecution JobExecution) Register a context with the current thread - always put a matchingJobSynchronizationManager.close()
call in a finally block to ensure that the correct context is available in the enclosing block. -
Uses of JobExecution in org.springframework.batch.integration.launch
Modifier and TypeMethodDescriptionJobLaunchingMessageHandler.launch
(JobLaunchRequest request) JobLaunchRequestHandler.launch
(JobLaunchRequest request) -
Uses of JobExecution in org.springframework.batch.test
Modifier and TypeMethodDescriptionstatic JobExecution
MetaDataInstanceFactory.createJobExecution()
Create aJobExecution
with default parameters.static JobExecution
MetaDataInstanceFactory.createJobExecution
(Long executionId) Create aJobExecution
with the parameters provided.static JobExecution
MetaDataInstanceFactory.createJobExecution
(String jobName, Long instanceId, Long executionId) Create aJobExecution
with the parameters provided.static JobExecution
MetaDataInstanceFactory.createJobExecution
(String jobName, Long instanceId, Long executionId, String jobParameters) Deprecated, for removal: This API element is subject to removal in a future version.static JobExecution
MetaDataInstanceFactory.createJobExecution
(String jobName, Long instanceId, Long executionId, JobParameters jobParameters) Create aJobExecution
with the parameters provided.static JobExecution
MetaDataInstanceFactory.createJobExecutionWithStepExecutions
(Long executionId, Collection<String> stepNames) Create aJobExecution
with the parameters provided with attached step executions.protected JobExecution
JobScopeTestExecutionListener.getJobExecution
(org.springframework.test.context.TestContext testContext) Discover aJobExecution
as a field in the test case or create one if none is available.JobLauncherTestUtils.launchJob()
Launch the entire job, including all steps.JobLauncherTestUtils.launchJob
(JobParameters jobParameters) Launch the entire job, including all stepsJobLauncherTestUtils.launchStep
(String stepName) Launch just the specified step in a surrounding single-step job of typeSimpleJob
namedStepRunner.JOB_NAME
.JobLauncherTestUtils.launchStep
(String stepName, JobParameters jobParameters) Launch just the specified step in a surrounding single-step job of typeSimpleJob
namedStepRunner.JOB_NAME
.JobLauncherTestUtils.launchStep
(String stepName, JobParameters jobParameters, ExecutionContext jobExecutionContext) Launch just the specified step in a surrounding single-step job of typeSimpleJob
namedStepRunner.JOB_NAME
.JobLauncherTestUtils.launchStep
(String stepName, ExecutionContext jobExecutionContext) Launch just the specified step in a surrounding single-step job of typeSimpleJob
namedStepRunner.JOB_NAME
.StepRunner.launchStep
(Step step) Launch just the specified step in a surrounding single-step job of typeSimpleJob
namedStepRunner.JOB_NAME
.StepRunner.launchStep
(Step step, JobParameters jobParameters) Launch just the specified step in a surrounding single-step job of typeSimpleJob
namedStepRunner.JOB_NAME
.StepRunner.launchStep
(Step step, JobParameters jobParameters, ExecutionContext jobExecutionContext) Launch just the specified step in a surrounding single-step job of typeSimpleJob
namedStepRunner.JOB_NAME
.StepRunner.launchStep
(Step step, ExecutionContext jobExecutionContext) Launch just the specified step in a surrounding single-step job of typeSimpleJob
namedStepRunner.JOB_NAME
.Modifier and TypeMethodDescriptionJobRepositoryTestUtils.createJobExecutions
(int count) Use theJobRepository
to create someJobExecution
instances each with a single step execution.JobRepositoryTestUtils.createJobExecutions
(String jobName, String[] stepNames, int count) Use theJobRepository
to create someJobExecution
instances each with the given job name and each having step executions with the given step names.Modifier and TypeMethodDescriptionstatic StepExecution
MetaDataInstanceFactory.createStepExecution
(JobExecution jobExecution, String stepName, Long executionId) Create aStepExecution
with the parameters provided.static <T> T
JobScopeTestUtils.doInJobScope
(JobExecution jobExecution, Callable<T> callable) static <T> T
ExecutionContextTestUtils.getValueFromJob
(JobExecution jobExecution, String key) static <T> T
ExecutionContextTestUtils.getValueFromStepInJob
(JobExecution jobExecution, String stepName, String key) void
JobRepositoryTestUtils.removeJobExecution
(JobExecution jobExecution) Remove theJobExecution
and its associatedStepExecution
instances from the standard locations used by Spring Batch.Modifier and TypeMethodDescriptionvoid
JobRepositoryTestUtils.removeJobExecutions
(Collection<JobExecution> jobExecutions) Remove theJobExecution
instances, and all associatedJobInstance
andStepExecution
instances from the standard locations used by Spring Batch.
MetaDataInstanceFactory.createJobExecution(String, Long, Long, JobParameters)
} instead.