Skip to content

piemjean/db-scheduler-mongo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

db-scheduler-mongo

Module adding mongodb support for db-scheduler

Principle

This module provides 3 main components :

  • MongoTaskRepository, a mongo implementation of TaskRepository
  • MongoSchedulerBuilder, a builder to make it easy to create a scheduler with the mongo repository
  • MongoScheduler, a scheduler extending the Scheduler, particularly the create method

This module aims to be the less intrusive as possible regarding the main project modules.

Usage

  1. Add maven dependency :
<dependency>
   <groupId>com.github.piemjean</groupId>
   <artifactId>db-scheduler-mongo</artifactId>
   <version>9.3</version>
</dependency>
  1. Instantiate and start the scheduler
final Scheduler scheduler = MongoScheduler
    .create(mongoClient, "scheduler-database", "scheduler-collection",
    knownTasks).build();

scheduler.start();
  1. Use the scheduler as detailed in the main documentation