Class SimpleScheduler
java.lang.Object
com.kingsrook.qqq.backend.core.scheduler.simple.SimpleScheduler
- All Implemented Interfaces:
QSchedulerInterface
QQQ Service (Singleton) that starts up repeating, scheduled jobs within QQQ.
These include:
- Automation providers (which require polling)
- Queue pollers
- Scheduled processes.
All of these jobs run using a "system session" - as defined by the sessionSupplier.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionGetter for managedExecutorsstatic SimpleSchedulergetInstance(QInstance qInstance) Singleton accessorGetter for schedulerNameGetter for sessionSupplierbooleanisScheduled(BasicSchedulableIdentity schedulableIdentity, SchedulableType schedulableType) voidsetSchedulerName(String schedulerName) Setter for schedulerNamevoidsetSessionSupplier(Supplier<QSession> sessionSupplier) Setter for sessionSuppliervoidsetupSchedulable(SchedulableIdentity schedulableIdentity, SchedulableType schedulableType, Map<String, Serializable> parameters, QScheduleMetaData schedule, boolean allowedToStart) voidstart()voidstop()voidvoidunInit()Handle a whole shutdown of the scheduler system (e.g., between unit tests).voidvoidunscheduleSchedulable(SchedulableIdentity schedulableIdentity, SchedulableType schedulableType) withSchedulerName(String schedulerName) Fluent setter for schedulerNameMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.kingsrook.qqq.backend.core.scheduler.QSchedulerInterface
doNotStart, endOfSetupSchedules, startOfSetupSchedules
-
Field Details
-
sessionSupplier
-
-
Method Details
-
getInstance
Singleton accessor -
start
public void start()- Specified by:
startin interfaceQSchedulerInterface
-
stopAsync
public void stopAsync()- Specified by:
stopAsyncin interfaceQSchedulerInterface
-
stop
public void stop()- Specified by:
stopin interfaceQSchedulerInterface
-
setupSchedulable
public void setupSchedulable(SchedulableIdentity schedulableIdentity, SchedulableType schedulableType, Map<String, Serializable> parameters, QScheduleMetaData schedule, boolean allowedToStart) - Specified by:
setupSchedulablein 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
-
setSessionSupplier
-
getSessionSupplier
-
getExecutors
Getter for managedExecutors -
getSchedulerName
Getter for schedulerName- Specified by:
getSchedulerNamein interfaceQSchedulerInterface
-
setSchedulerName
Setter for schedulerName -
withSchedulerName
Fluent setter for schedulerName -
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
-