org.springframework.cloud.task.repository.support.SimpleTaskExplorer Java Examples
The following examples show how to use
org.springframework.cloud.task.repository.support.SimpleTaskExplorer.
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: TaskBatchExecutionListenerFactoryBean.java From spring-cloud-task with Apache License 2.0 | 6 votes |
private MapTaskBatchDao getMapTaskBatchDao() throws Exception { Field taskExecutionDaoField = ReflectionUtils.findField(SimpleTaskExplorer.class, "taskExecutionDao"); taskExecutionDaoField.setAccessible(true); MapTaskExecutionDao taskExecutionDao; if (AopUtils.isJdkDynamicProxy(this.taskExplorer)) { SimpleTaskExplorer dereferencedTaskRepository = (SimpleTaskExplorer) ((Advised) this.taskExplorer) .getTargetSource().getTarget(); taskExecutionDao = (MapTaskExecutionDao) ReflectionUtils .getField(taskExecutionDaoField, dereferencedTaskRepository); } else { taskExecutionDao = (MapTaskExecutionDao) ReflectionUtils .getField(taskExecutionDaoField, this.taskExplorer); } return new MapTaskBatchDao(taskExecutionDao.getBatchJobAssociations()); }
Example #2
Source File: TaskLauncherTaskletTests.java From composed-task-runner with Apache License 2.0 | 5 votes |
@Before public void setup() throws Exception{ this.taskRepositoryInitializer.setDataSource(this.dataSource); this.taskRepositoryInitializer.afterPropertiesSet(); this.taskOperations = mock(TaskOperations.class); TaskExecutionDaoFactoryBean taskExecutionDaoFactoryBean = new TaskExecutionDaoFactoryBean(this.dataSource); this.taskRepository = new SimpleTaskRepository(taskExecutionDaoFactoryBean); this.taskExplorer = new SimpleTaskExplorer(taskExecutionDaoFactoryBean); this.composedTaskProperties.setIntervalTimeBetweenChecks(500); }
Example #3
Source File: TaskLauncherTaskletTests.java From spring-cloud-dataflow with Apache License 2.0 | 5 votes |
@BeforeEach public void setup() throws Exception{ this.taskRepositoryInitializer.setDataSource(this.dataSource); this.taskRepositoryInitializer.afterPropertiesSet(); this.taskOperations = mock(TaskOperations.class); TaskExecutionDaoFactoryBean taskExecutionDaoFactoryBean = new TaskExecutionDaoFactoryBean(this.dataSource); this.taskRepository = new SimpleTaskRepository(taskExecutionDaoFactoryBean); this.taskExplorer = new SimpleTaskExplorer(taskExecutionDaoFactoryBean); this.composedTaskProperties.setIntervalTimeBetweenChecks(500); }
Example #4
Source File: TaskStartTests.java From spring-cloud-task with Apache License 2.0 | 5 votes |
@Autowired public void setDataSource(DataSource dataSource) { this.dataSource = dataSource; TaskExecutionDaoFactoryBean factoryBean = new TaskExecutionDaoFactoryBean( dataSource); this.taskExplorer = new SimpleTaskExplorer(factoryBean); this.taskRepository = new SimpleTaskRepository(factoryBean); }
Example #5
Source File: TaskInitializerTests.java From spring-cloud-task with Apache License 2.0 | 5 votes |
@Autowired public void setDataSource(DataSource dataSource) { this.dataSource = dataSource; TaskExecutionDaoFactoryBean factoryBean = new TaskExecutionDaoFactoryBean( dataSource); this.taskExplorer = new SimpleTaskExplorer(factoryBean); }
Example #6
Source File: TaskServiceDependencies.java From spring-cloud-dataflow with Apache License 2.0 | 4 votes |
@Bean public TaskExplorer taskExplorer(TaskExecutionDaoFactoryBean daoFactoryBean) { return new SimpleTaskExplorer(daoFactoryBean); }
Example #7
Source File: JobDependencies.java From spring-cloud-dataflow with Apache License 2.0 | 4 votes |
@Bean public TaskExplorer taskExplorer(TaskExecutionDaoFactoryBean daoFactoryBean) { return new SimpleTaskExplorer(daoFactoryBean); }
Example #8
Source File: TaskPartitionerTests.java From spring-cloud-task with Apache License 2.0 | 4 votes |
@Autowired public void setDataSource(DataSource dataSource) { this.taskExplorer = new SimpleTaskExplorer(new TaskExecutionDaoFactoryBean(dataSource)); }
Example #9
Source File: TaskLauncherSinkTests.java From spring-cloud-task with Apache License 2.0 | 4 votes |
@Autowired public void setDataSource(DataSource dataSource) { this.dataSource = dataSource; this.taskExplorer = new SimpleTaskExplorer( new TaskExecutionDaoFactoryBean(dataSource)); }
Example #10
Source File: TestConfiguration.java From spring-cloud-task with Apache License 2.0 | 4 votes |
@Bean public TaskExplorer taskExplorer() { return new SimpleTaskExplorer(this.taskExecutionDaoFactoryBean); }
Example #11
Source File: TestDefaultConfiguration.java From spring-cloud-task with Apache License 2.0 | 4 votes |
@Bean public TaskExplorer taskExplorer() { return new SimpleTaskExplorer(this.factoryBean); }