类 AbstractEventPublisher
java.lang.Object
top.jiaojinxin.jln.event.AbstractEventPublisher
- 所有已实现的接口:
com.lmax.disruptor.EventHandler<AbstractEventPublisher.DisruptorEvent>,EventListener,org.springframework.boot.ApplicationRunner,org.springframework.context.ApplicationListener<org.springframework.context.event.ContextClosedEvent>,EventPublisher
- 直接已知子类:
DefaultEventPublisher
public abstract class AbstractEventPublisher
extends Object
implements EventPublisher, org.springframework.boot.ApplicationRunner, org.springframework.context.ApplicationListener<org.springframework.context.event.ContextClosedEvent>, com.lmax.disruptor.EventHandler<AbstractEventPublisher.DisruptorEvent>
事件发布者抽象实现
- 作者:
- JiaoJinxin
-
嵌套类概要
嵌套类 -
构造器概要
构造器限定符构造器说明protectedAbstractEventPublisher(int ringBufferSize, String threadNamePrefix, com.lmax.disruptor.dsl.ProducerType producerType, com.lmax.disruptor.WaitStrategy waitStrategy) 构造方法 -
方法概要
修饰符和类型方法说明protected abstract void执行事件发布voidonApplicationEvent(org.springframework.context.event.ContextClosedEvent event) voidonEvent(AbstractEventPublisher.DisruptorEvent event, long sequence, boolean endOfBatch) void发布事件voidrun(org.springframework.boot.ApplicationArguments args)
-
构造器详细资料
-
AbstractEventPublisher
protected AbstractEventPublisher(int ringBufferSize, String threadNamePrefix, com.lmax.disruptor.dsl.ProducerType producerType, com.lmax.disruptor.WaitStrategy waitStrategy) 构造方法- 参数:
ringBufferSize- 循环队列长度threadNamePrefix- 线程名称前缀producerType- 生产者类型waitStrategy- 等待策略
-
-
方法详细资料
-
publish
从接口复制的说明:EventPublisher发布事件- 指定者:
publish在接口中EventPublisher- 参数:
event- 事件
-
onEvent
- 指定者:
onEvent在接口中com.lmax.disruptor.EventHandler<AbstractEventPublisher.DisruptorEvent>
-
run
public void run(org.springframework.boot.ApplicationArguments args) - 指定者:
run在接口中org.springframework.boot.ApplicationRunner
-
onApplicationEvent
public void onApplicationEvent(org.springframework.context.event.ContextClosedEvent event) - 指定者:
onApplicationEvent在接口中org.springframework.context.ApplicationListener<org.springframework.context.event.ContextClosedEvent>
-
doPublish
执行事件发布- 参数:
event- 事件
-