![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Disruptor
Liao_Xiang
这个作者很懒,什么都没留下…
展开
-
一、Disruptor入门
参考demo:http://ifeve.com/disruptor-getting-started public class LongEvent { private long value; public long getValue() { return value; } public void setValue(long value) ...原创 2019-09-05 16:21:56 · 127 阅读 · 0 评论 -
二、数据消费方式
public class Trade { private String id;//ID private String name; private double price;//金额 private AtomicInteger count = new AtomicInteger(0); } public class TradeHandler implements Event...原创 2019-09-05 16:26:26 · 562 阅读 · 0 评论 -
三、多个消费者
public class Handler1 implements EventHandler<Trade>,WorkHandler<Trade> { @Override public void onEvent(Trade event, long sequence, boolean endOfBatch) throws Exception { ...原创 2019-09-05 16:33:14 · 177 阅读 · 0 评论