Class JdbcSearchableStepExecutionDao
java.lang.Object
org.springframework.batch.core.repository.dao.AbstractJdbcBatchMetadataDao
org.springframework.batch.core.repository.dao.JdbcStepExecutionDao
org.springframework.cloud.dataflow.server.batch.JdbcSearchableStepExecutionDao
- All Implemented Interfaces:
org.springframework.batch.core.repository.dao.StepExecutionDao,InitializingBean,SearchableStepExecutionDao
public class JdbcSearchableStepExecutionDao
extends org.springframework.batch.core.repository.dao.JdbcStepExecutionDao
implements SearchableStepExecutionDao
- Author:
- Dave Syer, Michael Minella, Glenn Renfro
-
Field Summary
Fields inherited from class org.springframework.batch.core.repository.dao.AbstractJdbcBatchMetadataDao
DEFAULT_EXIT_MESSAGE_LENGTH, DEFAULT_SHORT_CONTEXT_LENGTH, DEFAULT_TABLE_PREFIX -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidintcountStepExecutions(String jobName, String stepName) Count all the step executions for a given step name pattern.intcountStepExecutionsForJobExecution(long jobExecutionId) Count all the step executions for a given job execution.Collection<org.springframework.batch.core.StepExecution>findStepExecutions(String jobName, String stepName, int start, int count) Find all the step executions for a given step name, or step name pattern (with wildcards specified as '*') sorted in descending order of id.findStepNamesForJobExecution(String jobName, String excludesPattern) Find all the names of steps that have been executed as part of this job.voidsetDataSource(DataSource dataSource) Methods inherited from class org.springframework.batch.core.repository.dao.JdbcStepExecutionDao
addStepExecutions, countStepExecutions, deleteStepExecution, getLastStepExecution, getStepExecution, saveStepExecution, saveStepExecutions, setExitMessageLength, setStepExecutionIncrementer, updateStepExecutionMethods inherited from class org.springframework.batch.core.repository.dao.AbstractJdbcBatchMetadataDao
getClobTypeToUse, getJdbcTemplate, getQuery, getTablePrefix, setClobTypeToUse, setJdbcTemplate, setTablePrefixMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.batch.core.repository.dao.StepExecutionDao
addStepExecutions, countStepExecutions, deleteStepExecution, getLastStepExecution, getStepExecution, saveStepExecution, saveStepExecutions, updateStepExecution
-
Constructor Details
-
JdbcSearchableStepExecutionDao
public JdbcSearchableStepExecutionDao()
-
-
Method Details
-
setDataSource
- Parameters:
dataSource- the dataSource to set
-
afterPropertiesSet
- Specified by:
afterPropertiesSetin interfaceInitializingBean- Overrides:
afterPropertiesSetin classorg.springframework.batch.core.repository.dao.JdbcStepExecutionDao- Throws:
Exception- See Also:
-
JdbcJobExecutionDao.afterPropertiesSet()
-
findStepNamesForJobExecution
Description copied from interface:SearchableStepExecutionDaoFind all the names of steps that have been executed as part of this job. Implementations should remove step names matching the pattern provided.- Specified by:
findStepNamesForJobExecutionin interfaceSearchableStepExecutionDao- Parameters:
jobName- the name of the job to search forexcludesPattern- a pattern for step names to exclude- Returns:
- the names of step executions from job executions in the repository
-
findStepExecutions
public Collection<org.springframework.batch.core.StepExecution> findStepExecutions(String jobName, String stepName, int start, int count) Description copied from interface:SearchableStepExecutionDaoFind all the step executions for a given step name, or step name pattern (with wildcards specified as '*') sorted in descending order of id.- Specified by:
findStepExecutionsin interfaceSearchableStepExecutionDao- Parameters:
jobName- the job name or patternstepName- the step name or patternstart- the start index of the step executions to returncount- the maximum number of step executions to return- Returns:
- a collection of step executions
-
countStepExecutions
Description copied from interface:SearchableStepExecutionDaoCount all the step executions for a given step name pattern.- Specified by:
countStepExecutionsin interfaceSearchableStepExecutionDao- Parameters:
jobName- the job name patternstepName- the step name pattern.- Returns:
- the total number of step executions in the repository matching the pattern
-
countStepExecutionsForJobExecution
public int countStepExecutionsForJobExecution(long jobExecutionId) Description copied from interface:SearchableStepExecutionDaoCount all the step executions for a given job execution.- Specified by:
countStepExecutionsForJobExecutionin interfaceSearchableStepExecutionDao- Parameters:
jobExecutionId- the job execution to retrieve count from.- Returns:
- the total number of step executions in the repository for the job execution
-