Class MessageScheduler

  • All Implemented Interfaces:
    java.util.EventListener, org.springframework.beans.factory.DisposableBean, org.springframework.context.ApplicationListener<RqueueBootstrapEvent>
    Direct Known Subclasses:
    DelayedMessageScheduler, ProcessingMessageScheduler

    public abstract class MessageScheduler
    extends java.lang.Object
    implements org.springframework.beans.factory.DisposableBean, org.springframework.context.ApplicationListener<RqueueBootstrapEvent>
    • Constructor Detail

      • MessageScheduler

        public MessageScheduler()
    • Method Detail

      • getLogger

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

        protected abstract long getNextScheduleTime​(java.lang.String queueName,
                                                    java.lang.Long value)
      • getChannelName

        protected abstract java.lang.String getChannelName​(java.lang.String queueName)
      • getZsetName

        protected abstract java.lang.String getZsetName​(java.lang.String queueName)
      • getThreadNamePrefix

        protected abstract java.lang.String getThreadNamePrefix()
      • getThreadPoolSize

        protected abstract int getThreadPoolSize()
      • isProcessingQueue

        protected abstract boolean isProcessingQueue​(java.lang.String queueName)
      • destroy

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

        protected void schedule​(java.lang.String queueName,
                                java.lang.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>