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 TypeMethodDescriptionbooleandeleteJob(org.quartz.JobKey jobKey) voidcalled to indicate that the schedule manager is past its startup routine, but that the schedule should not actually be running in this process.voidlet the scheduler know when the schedule manager is at the end of setting up schedules.static QuartzSchedulerSingleton accessorGetter for qInstanceGetter for sessionSupplierstatic QuartzSchedulerinitInstance(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).booleanisScheduled(BasicSchedulableIdentity schedulableIdentity, SchedulableType schedulableType) voidpauseAll()voidvoidvoidvoidsetupSchedulable(SchedulableIdentity schedulableIdentity, SchedulableType schedulableType, Map<String, Serializable> parameters, QScheduleMetaData schedule, boolean allowedToStart) voidstart()voidlet the scheduler know when the schedule manager is at the start of setting up schedules.voidstop()voidvoidunInit()Handle a whole shutdown of the scheduler system (e.g., between unit tests).voidvoidunscheduleSchedulable(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:
getSchedulerNamein interfaceQSchedulerInterface
-
start
public void start()- Specified by:
startin interfaceQSchedulerInterface
-
doNotStart
public void doNotStart()Description copied from interface:QSchedulerInterfacecalled 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:
doNotStartin interfaceQSchedulerInterface
-
stop
public void stop()- Specified by:
stopin interfaceQSchedulerInterface
-
stopAsync
public void stopAsync()- Specified by:
stopAsyncin interfaceQSchedulerInterface
-
setupSchedulable
public void setupSchedulable(SchedulableIdentity schedulableIdentity, SchedulableType schedulableType, Map<String, Serializable> parameters, QScheduleMetaData schedule, boolean allowedToStart) - Specified by:
setupSchedulablein interfaceQSchedulerInterface
-
startOfSetupSchedules
public void startOfSetupSchedules()Description copied from interface:QSchedulerInterfacelet the scheduler know when the schedule manager is at the start of setting up schedules.- Specified by:
startOfSetupSchedulesin interfaceQSchedulerInterface
-
endOfSetupSchedules
public void endOfSetupSchedules()Description copied from interface:QSchedulerInterfacelet the scheduler know when the schedule manager is at the end of setting up schedules.- Specified by:
endOfSetupSchedulesin interfaceQSchedulerInterface
-
unscheduleSchedulable
public void unscheduleSchedulable(SchedulableIdentity schedulableIdentity, SchedulableType schedulableType) - Specified by:
unscheduleSchedulablein interfaceQSchedulerInterface
-
isScheduled
public boolean isScheduled(BasicSchedulableIdentity schedulableIdentity, SchedulableType schedulableType) - Specified by:
isScheduledin interfaceQSchedulerInterface
-
unscheduleAll
- Specified by:
unscheduleAllin 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:QSchedulerInterfaceHandle a whole shutdown of the scheduler system (e.g., between unit tests).- Specified by:
unInitin interfaceQSchedulerInterface
-