Class DefaultScheduler
java.lang.Object
com.aquima.interactions.process.scheduler.impl.DefaultScheduler
- All Implemented Interfaces:
IScheduler
This class provides a default implementation for the IScheduler interface.
Created by TimeaP on 8/3/2017.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThis method creates the object representing the job parameters.This method returns a schedule builder which can be used for creatingISchedule
objects.void
reschedule
(IJobId jobId, ISchedule schedule) This method reschedules a job.schedule
(Class<? extends IJob> jobClass, IJobParameters params, ISchedule schedule) This method schedules a job.void
scheduleJob
(SchedulerJobConfiguration schedulerJobConfiguration) Schedule a given job defined inSchedulerJobConfiguration
with the related set of triggers fromSchedulerJobConfiguration
associated with it.void
This method stops the execution of all the jobs registered to the scheduler.void
This method starts the scheduler which assumes that the execution of its jobs can begin.void
unschedule
(IJobId jobId) This method unschedules a previously scheduled jobvoid
unscheduleJob
(SchedulerJobConfiguration schedulerJobConfiguration) This method stops the execution of a certain job by unregistering its trigger(s) defined inSchedulerJobConfiguration
.void
This method updates the job data map with the new values sent in the parameter.
-
Constructor Details
-
DefaultScheduler
public DefaultScheduler()
-
-
Method Details
-
scheduleJob
Description copied from interface:IScheduler
Schedule a given job defined inSchedulerJobConfiguration
with the related set of triggers fromSchedulerJobConfiguration
associated with it.- Specified by:
scheduleJob
in interfaceIScheduler
- Parameters:
schedulerJobConfiguration
- the configuration
-
startScheduler
public void startScheduler()Description copied from interface:IScheduler
This method starts the scheduler which assumes that the execution of its jobs can begin. Until this point, the scheduler will be in 'stand-by' mode.- Specified by:
startScheduler
in interfaceIScheduler
-
shutdownScheduler
public void shutdownScheduler()Description copied from interface:IScheduler
This method stops the execution of all the jobs registered to the scheduler.- Specified by:
shutdownScheduler
in interfaceIScheduler
-
unscheduleJob
Description copied from interface:IScheduler
This method stops the execution of a certain job by unregistering its trigger(s) defined inSchedulerJobConfiguration
. If the job has no other triggers, the job itself will be deleted as well.- Specified by:
unscheduleJob
in interfaceIScheduler
- Parameters:
schedulerJobConfiguration
- the configuration
-
schedule
Description copied from interface:IScheduler
This method schedules a job.- Specified by:
schedule
in interfaceIScheduler
- Parameters:
jobClass
- the class of the jobparams
- the parameters of the jobschedule
- the schedule of the job- Returns:
- the id of the job
-
unschedule
Description copied from interface:IScheduler
This method unschedules a previously scheduled job- Specified by:
unschedule
in interfaceIScheduler
- Parameters:
jobId
- the ID of the job
-
reschedule
Description copied from interface:IScheduler
This method reschedules a job. The old schedule is replaced by the new schedule- Specified by:
reschedule
in interfaceIScheduler
- Parameters:
jobId
- the ID of the jobschedule
- the new schedule of the job
-
getScheduleBuilder
Description copied from interface:IScheduler
This method returns a schedule builder which can be used for creatingISchedule
objects.- Specified by:
getScheduleBuilder
in interfaceIScheduler
- Returns:
- the created scheduleBuilder
-
createJobParameters
Description copied from interface:IScheduler
This method creates the object representing the job parameters.- Specified by:
createJobParameters
in interfaceIScheduler
- Returns:
- a new job parameters object
-
updateJobData
Description copied from interface:IScheduler
This method updates the job data map with the new values sent in the parameter.- Specified by:
updateJobData
in interfaceIScheduler
- Parameters:
config
- Job configuration with the new values.
-