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 SimpleScheduler
getInstance
(QInstance qInstance) Singleton accessorGetter for schedulerNameGetter for sessionSupplierboolean
isScheduled
(BasicSchedulableIdentity schedulableIdentity, SchedulableType schedulableType) void
setSchedulerName
(String schedulerName) Setter for schedulerNamevoid
setSessionSupplier
(Supplier<QSession> sessionSupplier) Setter for sessionSuppliervoid
setupSchedulable
(SchedulableIdentity schedulableIdentity, SchedulableType schedulableType, Map<String, Serializable> parameters, QScheduleMetaData schedule, boolean allowedToStart) void
start()
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) withSchedulerName
(String schedulerName) Fluent setter for schedulerNameMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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:
start
in interfaceQSchedulerInterface
-
stopAsync
public void stopAsync()- Specified by:
stopAsync
in interfaceQSchedulerInterface
-
stop
public void stop()- Specified by:
stop
in interfaceQSchedulerInterface
-
setupSchedulable
public void setupSchedulable(SchedulableIdentity schedulableIdentity, SchedulableType schedulableType, Map<String, Serializable> parameters, QScheduleMetaData schedule, boolean allowedToStart) - Specified by:
setupSchedulable
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
-
setSessionSupplier
-
getSessionSupplier
-
getExecutors
Getter for managedExecutors -
getSchedulerName
Getter for schedulerName- Specified by:
getSchedulerName
in interfaceQSchedulerInterface
-
setSchedulerName
Setter for schedulerName -
withSchedulerName
Fluent setter for schedulerName -
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
-