Class QuartzScheduler
java.lang.Object
com.kingsrook.qqq.backend.core.scheduler.quartz.QuartzScheduler
- All Implemented Interfaces:
QSchedulerInterface
Singleton to provide access between QQQ and the quartz Scheduler system.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
deleteJob
(org.quartz.JobKey jobKey) void
called to indicate that the schedule manager is past its startup routine, but that the schedule should not actually be running in this process.void
let the scheduler know when the schedule manager is at the end of setting up schedules.static QuartzScheduler
Singleton accessorGetter for qInstanceGetter for sessionSupplierstatic QuartzScheduler
initInstance
(QInstance qInstance, String schedulerName, Properties quartzProperties, Supplier<QSession> sessionSupplier) Singleton initiator - e.g., must be called to initially initialize the singleton before anyone else calls getInstance (they'll get an error if they call that first).boolean
isScheduled
(BasicSchedulableIdentity schedulableIdentity, SchedulableType schedulableType) void
pauseAll()
void
void
void
void
setupSchedulable
(SchedulableIdentity schedulableIdentity, SchedulableType schedulableType, Map<String, Serializable> parameters, QScheduleMetaData schedule, boolean allowedToStart) void
start()
void
let the scheduler know when the schedule manager is at the start of setting up schedules.void
stop()
void
void
unInit()
Handle a whole shutdown of the scheduler system (e.g., between unit tests).void
void
unscheduleSchedulable
(SchedulableIdentity schedulableIdentity, SchedulableType schedulableType)
-
Method Details
-
initInstance
public static QuartzScheduler initInstance(QInstance qInstance, String schedulerName, Properties quartzProperties, Supplier<QSession> sessionSupplier) throws org.quartz.SchedulerException Singleton initiator - e.g., must be called to initially initialize the singleton before anyone else calls getInstance (they'll get an error if they call that first).- Throws:
org.quartz.SchedulerException
-
getInstance
Singleton accessor -
getSchedulerName
- Specified by:
getSchedulerName
in interfaceQSchedulerInterface
-
start
public void start()- Specified by:
start
in interfaceQSchedulerInterface
-
doNotStart
public void doNotStart()Description copied from interface:QSchedulerInterface
called to indicate that the schedule manager is past its startup routine, but that the schedule should not actually be running in this process.- Specified by:
doNotStart
in interfaceQSchedulerInterface
-
stop
public void stop()- Specified by:
stop
in interfaceQSchedulerInterface
-
stopAsync
public void stopAsync()- Specified by:
stopAsync
in interfaceQSchedulerInterface
-
setupSchedulable
public void setupSchedulable(SchedulableIdentity schedulableIdentity, SchedulableType schedulableType, Map<String, Serializable> parameters, QScheduleMetaData schedule, boolean allowedToStart) - Specified by:
setupSchedulable
in interfaceQSchedulerInterface
-
startOfSetupSchedules
public void startOfSetupSchedules()Description copied from interface:QSchedulerInterface
let the scheduler know when the schedule manager is at the start of setting up schedules.- Specified by:
startOfSetupSchedules
in interfaceQSchedulerInterface
-
endOfSetupSchedules
public void endOfSetupSchedules()Description copied from interface:QSchedulerInterface
let the scheduler know when the schedule manager is at the end of setting up schedules.- Specified by:
endOfSetupSchedules
in interfaceQSchedulerInterface
-
unscheduleSchedulable
public void unscheduleSchedulable(SchedulableIdentity schedulableIdentity, SchedulableType schedulableType) - Specified by:
unscheduleSchedulable
in interfaceQSchedulerInterface
-
isScheduled
public boolean isScheduled(BasicSchedulableIdentity schedulableIdentity, SchedulableType schedulableType) - Specified by:
isScheduled
in interfaceQSchedulerInterface
-
unscheduleAll
- Specified by:
unscheduleAll
in interfaceQSchedulerInterface
- Throws:
QException
-
deleteJob
public boolean deleteJob(org.quartz.JobKey jobKey) -
getQInstance
Getter for qInstance -
getSessionSupplier
-
pauseAll
public void pauseAll() throws org.quartz.SchedulerException- Throws:
org.quartz.SchedulerException
-
resumeAll
public void resumeAll() throws org.quartz.SchedulerException- Throws:
org.quartz.SchedulerException
-
pauseJob
-
resumeJob
-
queryQuartz
- Throws:
org.quartz.SchedulerException
-
unInit
public void unInit()Description copied from interface:QSchedulerInterface
Handle a whole shutdown of the scheduler system (e.g., between unit tests).- Specified by:
unInit
in interfaceQSchedulerInterface
-