Disruptor3.x Disruptor使用方式

时间:2021-02-01 06:38:55
【文件属性】:

文件名称:Disruptor3.x Disruptor使用方式

文件大小:4KB

文件格式:ZIP

更新时间:2021-02-01 06:38:55

Disruptor java 队列

Disruptor3.x Disruptor使用方式 EventHandler[] eventHandlers=new DisruptorEventHandler[]{new DisruptorEventHandler()}; DisruptorPublisher dp=new DisruptorPublisher(1024, eventHandlers); dp.start(); for (int i = 0; true; i++) { CDO cdo=new CDO(); cdo.setStringValue("strSN", i+"-"+DataUtil.uuid()); EventData data=new EventData(cdo); dp.publish(data); }


【文件预览】:
3.x Disruptor使用方式
----IEventPublisher.java(143B)
----DisruptorPublisher.java(2KB)
----EventData.java(438B)
----DisruptorEventHandler.java(733B)
----TestDisruptor.java(809B)
----Event.java(452B)

网友评论