Awesome
db-scheduler-mongo
Module adding mongodb support for db-scheduler
Principle
This module provides 3 main components :
MongoTaskRepository
, a mongo implementation ofTaskRepository
MongoSchedulerBuilder
, a builder to make it easy to create a scheduler with the mongo repositoryMongoScheduler
, a scheduler extending theScheduler
, particularly thecreate
method
This module aims to be the less intrusive as possible regarding the main project modules.
Usage
- Add maven dependency :
<dependency>
<groupId>com.github.piemjean</groupId>
<artifactId>db-scheduler-mongo</artifactId>
<version>9.3</version>
</dependency>
- Instantiate and start the scheduler
final Scheduler scheduler = MongoScheduler
.create(mongoClient, "scheduler-database", "scheduler-collection",
knownTasks).build();
scheduler.start();
- Use the scheduler as detailed in the main documentation