Java 并发框架Disruptor(七)

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>

  

猜你喜欢

转载自www.cnblogs.com/sunliyuan/p/10872380.html