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

  • Constructor Details

    • MessageScheduler

      public MessageScheduler()
  • Method Details

    • getLogger

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

      protected abstract long getNextScheduleTime(String queueName, 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()
    • isProcessingQueue

      protected abstract boolean isProcessingQueue(String queueName)
    • getQueueStartTime

      protected long getQueueStartTime()
    • destroy

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

      protected com.github.sonus21.rqueue.core.ScheduledTaskDetail getScheduledTask(String queueName)
    • schedule

      protected void schedule(String queueName, Long startTime, boolean forceSchedule)
    • initialize

      protected void initialize()
    • onApplicationEvent

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

      protected long getMinDelay()