1.建立一个工厂Event类,用于创建Event类实例对象
2.需要有一个jian监听事件类,用于处理数据(Event类)
3.实例化Disruptor实例,配置一系列参数,编写DisDisruptor核心组件
4.编写生产者组件,向Disruptor容器中投递数据
pom.xml添加:
<dependency> <groupId>com.lmax</groupId> <artifactId>disruptor</artifactId> <scope>3.3.2</scope> </dependency>
原文:https://www.cnblogs.com/sunliyuan/p/10872380.html