Class QuartzScheduler

  • All Implemented Interfaces:
    io.quarkus.scheduler.Scheduler

    @Singleton
    public class QuartzScheduler
    extends Object
    implements io.quarkus.scheduler.Scheduler
    Although this class is not part of the public API it must not be renamed in order to preserve backward compatibility. The name of this class can be stored in a Quartz table in the database. See https://github.com/quarkusio/quarkus/issues/29177 for more information.
    • Constructor Detail

      • QuartzScheduler

        public QuartzScheduler​(io.quarkus.scheduler.common.runtime.SchedulerContext context,
                               QuartzSupport quartzSupport,
                               SchedulerRuntimeConfig schedulerRuntimeConfig,
                               javax.enterprise.event.Event<io.quarkus.scheduler.SkippedExecution> skippedExecutionEvent,
                               javax.enterprise.event.Event<io.quarkus.scheduler.SuccessfulExecution> successfulExecutionEvent,
                               javax.enterprise.event.Event<io.quarkus.scheduler.FailedExecution> failedExecutionEvent,
                               javax.enterprise.inject.Instance<org.quartz.Job> jobs,
                               javax.enterprise.inject.Instance<javax.transaction.UserTransaction> userTransaction,
                               io.vertx.core.Vertx vertx)
    • Method Detail

      • produceQuartzScheduler

        @Produces
        @Singleton
        org.quartz.Scheduler produceQuartzScheduler()
      • pause

        public void pause()
        Specified by:
        pause in interface io.quarkus.scheduler.Scheduler
      • pause

        public void pause​(String identity)
        Specified by:
        pause in interface io.quarkus.scheduler.Scheduler
      • isPaused

        public boolean isPaused​(String identity)
        Specified by:
        isPaused in interface io.quarkus.scheduler.Scheduler
      • resume

        public void resume()
        Specified by:
        resume in interface io.quarkus.scheduler.Scheduler
      • resume

        public void resume​(String identity)
        Specified by:
        resume in interface io.quarkus.scheduler.Scheduler
      • isRunning

        public boolean isRunning()
        Specified by:
        isRunning in interface io.quarkus.scheduler.Scheduler
      • getScheduledJobs

        public List<io.quarkus.scheduler.Trigger> getScheduledJobs()
        Specified by:
        getScheduledJobs in interface io.quarkus.scheduler.Scheduler
      • getScheduledJob

        public io.quarkus.scheduler.Trigger getScheduledJob​(String identity)
        Specified by:
        getScheduledJob in interface io.quarkus.scheduler.Scheduler
      • start

        void start​(@Observes @Priority(0)
                   io.quarkus.runtime.StartupEvent startupEvent)
      • destroy

        void destroy​(@Observes @BeforeDestroyed(javax.enterprise.context.ApplicationScoped.class)
                     Object event)
        Need to gracefully shut down the scheduler making sure that all triggers have been released before datasource shutdown.
        Parameters:
        event - ignored
      • destroy

        @PreDestroy
        void destroy()