Class InMemoryBatchConfigurer
- java.lang.Object
-
- com.github.marschall.spring.batch.inmemory.InMemoryBatchConfigurer
-
- All Implemented Interfaces:
BatchConfigurer
@Component public class InMemoryBatchConfigurer extends Object implements BatchConfigurer
ABatchConfigurerfor use withAbstractBatchConfigurationthat sets up Spring Batch with a in-memoryJobRepositoryandJobExplorer.Requires a
PlatformTransactionManageris defined somewhere.
-
-
Constructor Summary
Constructors Constructor Description InMemoryBatchConfigurer(PlatformTransactionManager transactionManager)Constructs a newInMemoryBatchConfigurer.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JobExplorergetJobExplorer()JobLaunchergetJobLauncher()JobRepositorygetJobRepository()PlatformTransactionManagergetTransactionManager()
-
-
-
Constructor Detail
-
InMemoryBatchConfigurer
public InMemoryBatchConfigurer(PlatformTransactionManager transactionManager)
Constructs a newInMemoryBatchConfigurer.- Parameters:
transactionManager- the transaction manager to use, should be the transaction manager used by the tests, if you tests don't or need a transaction manager then useResourcelessTransactionManager, notnull
-
-
Method Detail
-
getJobExplorer
public JobExplorer getJobExplorer()
- Specified by:
getJobExplorerin interfaceBatchConfigurer
-
getJobRepository
public JobRepository getJobRepository()
- Specified by:
getJobRepositoryin interfaceBatchConfigurer
-
getTransactionManager
public PlatformTransactionManager getTransactionManager()
- Specified by:
getTransactionManagerin interfaceBatchConfigurer
-
getJobLauncher
public JobLauncher getJobLauncher() throws Exception
- Specified by:
getJobLauncherin interfaceBatchConfigurer- Throws:
Exception
-
-