Class MessageScheduler

java.lang.Object
com.github.sonus21.rqueue.core.MessageScheduler
All Implemented Interfaces:
EventListener, org.springframework.beans.factory.DisposableBean, org.springframework.context.ApplicationListener<RqueueBootstrapEvent>
Direct Known Subclasses:
ProcessingQueueMessageScheduler, ScheduledQueueMessageScheduler

public abstract class MessageScheduler extends Object implements org.springframework.beans.factory.DisposableBean, org.springframework.context.ApplicationListener<RqueueBootstrapEvent>
  • Field Details

    • rqueueSchedulerConfig

      @Autowired protected RqueueSchedulerConfig rqueueSchedulerConfig
    • rqueueConfig

      @Autowired protected RqueueConfig rqueueConfig
    • redisScheduleTriggerHandler

      protected com.github.sonus21.rqueue.core.RedisScheduleTriggerHandler redisScheduleTriggerHandler
  • Constructor Details

    • MessageScheduler

      public MessageScheduler()
  • Method Details

    • getLogger

      protected abstract org.slf4j.Logger getLogger()
    • getNextScheduleTime

      protected abstract long getNextScheduleTime(String queueName, long currentTime, Long value)
    • getChannelName

      protected abstract String getChannelName(String queueName)
    • getZsetName

      protected abstract String getZsetName(String queueName)
    • getThreadNamePrefix

      protected abstract String getThreadNamePrefix()
    • getThreadPoolSize

      protected abstract int getThreadPoolSize()
    • getPeriod

      protected Duration getPeriod()
    • isProcessingQueue

      protected abstract boolean isProcessingQueue()
    • schedule

      protected void schedule(String queueName)
    • destroy

      public void destroy() throws Exception
      Specified by:
      destroy in interface org.springframework.beans.factory.DisposableBean
      Throws:
      Exception
    • initialize

      protected void initialize()
    • onApplicationEvent

      @Async public void onApplicationEvent(RqueueBootstrapEvent event)
      Specified by:
      onApplicationEvent in interface org.springframework.context.ApplicationListener<RqueueBootstrapEvent>
    • addTask

      protected Future<?> addTask(String queueName)