public class DefaultTaskConfigurer extends Object implements TaskConfigurer
TaskConfigurer
implementation is present, then this configuration will be used. The following defaults
will be used:
SimpleTaskRepository is the default TaskRepository returned. If a
data source is present then a data will be stored in the database
JdbcTaskExecutionDao else it will be stored in a map
MapTaskExecutionDao.
| Constructor and Description |
|---|
DefaultTaskConfigurer() |
DefaultTaskConfigurer(DataSource dataSource)
Initializes the DefaultTaskConfigurer and sets the default table prefix to
TaskProperties.DEFAULT_TABLE_PREFIX. |
DefaultTaskConfigurer(DataSource dataSource,
String tablePrefix,
org.springframework.context.ApplicationContext context)
Initializes the DefaultTaskConfigurer.
|
DefaultTaskConfigurer(String tablePrefix)
Initializes the DefaultTaskConfigurer.
|
| Modifier and Type | Method and Description |
|---|---|
DataSource |
getTaskDataSource()
Retrieves the
DataSource that will be used for task operations. |
TaskExplorer |
getTaskExplorer()
Create a
TaskExplorer for the task. |
TaskRepository |
getTaskRepository()
Create a
TaskRepository for the Task. |
org.springframework.transaction.PlatformTransactionManager |
getTransactionManager()
Create a
PlatformTransactionManager for use with the
TaskRepository. |
public DefaultTaskConfigurer()
public DefaultTaskConfigurer(DataSource dataSource)
TaskProperties.DEFAULT_TABLE_PREFIX.dataSource - references the DataSource to be used as the Task
repository. If none is provided, a Map will be used (not recommended for production
use).public DefaultTaskConfigurer(String tablePrefix)
tablePrefix - the prefix to apply to the task table names used by task
infrastructure.public DefaultTaskConfigurer(DataSource dataSource, String tablePrefix, org.springframework.context.ApplicationContext context)
dataSource - references the DataSource to be used as the Task
repository. If none is provided, a Map will be used (not recommended for production
use).tablePrefix - the prefix to apply to the task table names used by task
infrastructure.context - the context to be used.public TaskRepository getTaskRepository()
TaskConfigurerTaskRepository for the Task.getTaskRepository in interface TaskConfigurerpublic TaskExplorer getTaskExplorer()
TaskConfigurerTaskExplorer for the task.getTaskExplorer in interface TaskConfigurerTaskExplorerpublic DataSource getTaskDataSource()
TaskConfigurerDataSource that will be used for task operations. If a
DataSource is not being used for the implemented TaskConfigurer this method will
return null.getTaskDataSource in interface TaskConfigurerDataSource that will be used for task operations.public org.springframework.transaction.PlatformTransactionManager getTransactionManager()
TaskConfigurerPlatformTransactionManager for use with the
TaskRepository.getTransactionManager in interface TaskConfigurerPlatformTransactionManagerCopyright © 2019 Pivotal Software, Inc.. All rights reserved.