Package com.github.sonus21.rqueue.core
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 Summary
FieldsModifier and TypeFieldDescriptionprotected com.github.sonus21.rqueue.core.RedisScheduleTriggerHandlerprotected RqueueConfigprotected RqueueSchedulerConfig -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Future<?> voiddestroy()protected abstract StringgetChannelName(String queueName) protected abstract org.slf4j.Loggerprotected abstract longgetNextScheduleTime(String queueName, long currentTime, Long value) protected Durationprotected abstract Stringprotected abstract intprotected abstract StringgetZsetName(String queueName) protected voidprotected abstract booleanvoidprotected voidMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.context.ApplicationListener
supportsAsyncExecution
-
Field Details
-
rqueueSchedulerConfig
-
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
-
getChannelName
-
getZsetName
-
getThreadNamePrefix
-
getThreadPoolSize
protected abstract int getThreadPoolSize() -
getPeriod
-
isProcessingQueue
protected abstract boolean isProcessingQueue() -
schedule
-
destroy
- Specified by:
destroyin interfaceorg.springframework.beans.factory.DisposableBean- Throws:
Exception
-
initialize
protected void initialize() -
onApplicationEvent
- Specified by:
onApplicationEventin interfaceorg.springframework.context.ApplicationListener<RqueueBootstrapEvent>
-
addTask
-