Class DefaultScheduler

java.lang.Object
com.aquima.interactions.process.scheduler.impl.DefaultScheduler
All Implemented Interfaces:
IScheduler

public class DefaultScheduler extends Object implements IScheduler
This class provides a default implementation for the IScheduler interface. Created by TimeaP on 8/3/2017.
  • Constructor Details

    • DefaultScheduler

      public DefaultScheduler()
  • Method Details

    • scheduleJob

      public void scheduleJob(SchedulerJobConfiguration schedulerJobConfiguration)
      Description copied from interface: IScheduler
      Schedule a given job defined in SchedulerJobConfiguration with the related set of triggers from SchedulerJobConfiguration associated with it.
      Specified by:
      scheduleJob in interface IScheduler
      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 interface IScheduler
    • 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 interface IScheduler
    • unscheduleJob

      public void unscheduleJob(SchedulerJobConfiguration schedulerJobConfiguration)
      Description copied from interface: IScheduler
      This method stops the execution of a certain job by unregistering its trigger(s) defined in SchedulerJobConfiguration. If the job has no other triggers, the job itself will be deleted as well.
      Specified by:
      unscheduleJob in interface IScheduler
      Parameters:
      schedulerJobConfiguration - the configuration
    • schedule

      public IJobId schedule(Class<? extends IJob> jobClass, IJobParameters params, ISchedule schedule)
      Description copied from interface: IScheduler
      This method schedules a job.
      Specified by:
      schedule in interface IScheduler
      Parameters:
      jobClass - the class of the job
      params - the parameters of the job
      schedule - the schedule of the job
      Returns:
      the id of the job
    • unschedule

      public void unschedule(IJobId jobId)
      Description copied from interface: IScheduler
      This method unschedules a previously scheduled job
      Specified by:
      unschedule in interface IScheduler
      Parameters:
      jobId - the ID of the job
    • reschedule

      public void reschedule(IJobId jobId, ISchedule schedule)
      Description copied from interface: IScheduler
      This method reschedules a job. The old schedule is replaced by the new schedule
      Specified by:
      reschedule in interface IScheduler
      Parameters:
      jobId - the ID of the job
      schedule - the new schedule of the job
    • getScheduleBuilder

      public IScheduleBuilder getScheduleBuilder()
      Description copied from interface: IScheduler
      This method returns a schedule builder which can be used for creating ISchedule objects.
      Specified by:
      getScheduleBuilder in interface IScheduler
      Returns:
      the created scheduleBuilder
    • createJobParameters

      public IJobParameters createJobParameters()
      Description copied from interface: IScheduler
      This method creates the object representing the job parameters.
      Specified by:
      createJobParameters in interface IScheduler
      Returns:
      a new job parameters object
    • updateJobData

      public void updateJobData(SchedulerJobConfiguration config)
      Description copied from interface: IScheduler
      This method updates the job data map with the new values sent in the parameter.
      Specified by:
      updateJobData in interface IScheduler
      Parameters:
      config - Job configuration with the new values.