1 Disruptor disruptor = new Disruptor<ValueEvent>(ValueEvent.EVENT_FACTORY, ringBufferSize, exec,
                        ProducerType.MULTI, waitStrategy);

    public Disruptor(final EventFactory<T> eventFactory,
final int ringBufferSize,
final Executor executor,
final ProducerType producerType,
final WaitStrategy waitStrategy)
{
this(RingBuffer.create(producerType, eventFactory, ringBufferSize, waitStrategy),
executor);
}
  
    public static <E> RingBuffer<E> create(ProducerType    producerType,
EventFactory<E> factory,
int bufferSize,
WaitStrategy waitStrategy)
{
switch (producerType)
{
case SINGLE:
return createSingleProducer(factory, bufferSize, waitStrategy);
case MULTI:
return createMultiProducer(factory, bufferSize, waitStrategy);
default:
throw new IllegalStateException(producerType.toString());
}
}

  

 

createMultiProducer:

    public static <E> RingBuffer<E> createMultiProducer(EventFactory<E> factory,
int bufferSize,
WaitStrategy waitStrategy)
{
MultiProducerSequencer sequencer = new MultiProducerSequencer(bufferSize, waitStrategy);//Sequencer
    //public final class MultiProducerSequencer extends AbstractSequencer
    //public abstract class AbstractSequencer implements Sequencer return new RingBuffer<E>(factory, sequencer);
}
  
    RingBuffer(EventFactory<E> eventFactory,
Sequencer sequencer)
{
this.sequencer = sequencer;
this.bufferSize = sequencer.getBufferSize(); if (bufferSize < 1)
{
throw new IllegalArgumentException("bufferSize must not be less than 1");
}
if (Integer.bitCount(bufferSize) != 1)
{
throw new IllegalArgumentException("bufferSize must be a power of 2");
} this.indexMask = bufferSize - 1;
this.entries = new Object[sequencer.getBufferSize()];
fill(eventFactory);
}
    
    private void fill(EventFactory<E> eventFactory)
{
for (int i = 0; i < entries.length; i++)
{
entries[i] = eventFactory.newInstance();
}
}

 

 

2 disruptor.handleEventsWith(eventHandlers);

  

    public EventHandlerGroup<T> handleEventsWith(final EventHandler<T>... handlers)
{
return createEventProcessors(new Sequence[0], handlers);
}
  EventHandlerGroup<T> createEventProcessors(final Sequence[] barrierSequences,
final EventHandler<T>[] eventHandlers)
{
checkNotStarted(); final Sequence[] processorSequences = new Sequence[eventHandlers.length];
final SequenceBarrier barrier = ringBuffer.newBarrier(barrierSequences);//
//ProcessingSequenceBarrier ProcessingSequenceBarrier implements SequenceBarrier for (int i = 0, eventHandlersLength = eventHandlers.length; i < eventHandlersLength; i++)
{
final EventHandler<T> eventHandler = eventHandlers[i]; final BatchEventProcessor<T> batchEventProcessor = new BatchEventProcessor<T>(ringBuffer, barrier, eventHandler); if (exceptionHandler != null)
{
batchEventProcessor.setExceptionHandler(exceptionHandler);
} consumerRepository.add(batchEventProcessor, eventHandler, barrier);
processorSequences[i] = batchEventProcessor.getSequence();
} if (processorSequences.length > 0)
{
consumerRepository.unMarkEventProcessorsAsEndOfChain(barrierSequences);
} return new EventHandlerGroup<T>(this, consumerRepository, processorSequences);
}
consumerRepository 与 batchEventProcessor eventHandler SequenceBarrier 关联起来
EventHandlerGroup 与disruptor consumerRepository Sequence 关联起来

  

3 disruptor.start();

    public RingBuffer<T> start()
{
Sequence[] gatingSequences = consumerRepository.getLastSequenceInChain(true);
ringBuffer.addGatingSequences(gatingSequences); checkOnlyStartedOnce();
for (ConsumerInfo consumerInfo : consumerRepository)
{
consumerInfo.start(executor);//自定义的线程池执行EventProcessorInfo
} return ringBuffer;
} class EventProcessorInfo<T> implements ConsumerInfo
    @Override
    public void start(final Executor executor)
    {
        executor.execute(eventprocessor);//batchEventProcessor
    } BatchEventProcessor RUN方法
  @Override
    public void run()
    {
        if (!running.compareAndSet(false, true))
        {
            throw new IllegalStateException("Thread is already running");
        }
        sequenceBarrier.clearAlert();         notifyStart();         T event = null;
//Concurrent sequence class used for tracking the progress of
// * the ring buffer and event processors.  Support a number
 //* of concurrent operations including CAS and order writes
        long nextSequence = sequence.get() + 1L;//使用CAS取得下一个序列号
        try
        {
            while (true)
            {
                try
                {
                    final long availableSequence = sequenceBarrier.waitFor(nextSequence);//等待策略取得可用序列号                     if (nextSequence > availableSequence)//
                    {
                        Thread.yield();
                    }                     while (nextSequence <= availableSequence)
                    {
                        event = dataProvider.get(nextSequence);//dataProvider 就是ringbuffer
                        eventHandler.onEvent(event, nextSequence, nextSequence == availableSequence);//触发自定义事件
                        nextSequence++;
                    }                     sequence.set(availableSequence);
                }
                catch (final TimeoutException e)
                {
                    notifyTimeout(sequence.get());
                }
                catch (final AlertException ex)
                {
                    if (!running.get())
                    {
                        break;
                    }
                }
                catch (final Throwable ex)
                {
                    exceptionHandler.handleEventException(ex, nextSequence, event);
                    sequence.set(nextSequence);
                    nextSequence++;
                }
            }
        }
        finally
        {
            notifyShutdown();
            running.set(false);
        }
    }

4 介绍 final long availableSequence = sequenceBarrier.waitFor(nextSequence);//等待可用序列号

  内容代码

    @Override
public long waitFor(final long sequence)
throws AlertException, InterruptedException, TimeoutException
{
checkAlert(); long availableSequence = waitStrategy.waitFor(sequence, cursorSequence, dependentSequence, this); if (availableSequence < sequence)
{
return availableSequence;
} return sequencer.getHighestPublishedSequence(sequence, availableSequence);
}

  6种等待策略

  aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAeUAAADbCAIAAADcVR5cAAAgAElEQVR4nO2da1BUV9rvV9WpOp/fOpX308nMmUkyOW9OOScT0Qx2Wanoq0YJGlC8ARoU7WQ0yeuMOd4QaYVEAya0iEEZdQiOoCSOLWibi45pEicmGW8Dg5eORNCoiHeN7WCsdT7s27ruS3PpveXp+n2A3Wuvy7Obf6/97MX6I4zbMI6UDkEIoSFDBiKE0JBlUdyGcRvGVX6EyCNh9feBpdE2HF02BCGEkD+sFBYTLWXqbMNYP3dgadRoZUhpBJOt6KeEMxFCCGWGLbukvmvZPSctmtWjxU2rh+6qNnbtV3rUpudqjWrvaqPWq2IjiZC/igo4HVvxNWJbUbtkY+B6b5VW4hhajwbB5INHf1qMcBEHmY8o9WGgeiu6oFrYic6rEWMLc9fCrF3ph0d0OawDZf4Hrl1Epf9DBg7RPk5Kl5SzlMrjj5VemIxYXB9gtVf6Z0b0Vy+prRc+byafAQeXjP7T05tWa9beHbIMMc3Qtes9pl9a/8L829SVIw4bweX/vOPSa3GXq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1uv3GqInL8WaLtw79kOsP1CeTeT3skMJ74+rgtAQSEYIoaSShkT3EDimXKbeuRZNF+6dvBR7ryGacPnzHAnW671HzoS+7Yhevvf9tS4AAPoD0cv3Qt927Dn8XcLlz3MkWK//df9sw7dnikOJ92wGAKBvKA6dbvj2zL/un024/HmOBOs1AAAAYBPQawAAAG8Aeg0AAOANQK8BAAC8Aeg1AACANwC9BgAA8Aag1wAAAN4A9BoAAMAbgF4DAAB4A9BrAAAAbwB6DQAA4A1ArwEAALwB6DUAAIA3AL0GAADwBqDXAAAA3gD0GgAAwBuAXgMAAHgD0GsAAABvAHoNAADgDUCvAQAAvAHoNQAAgDcAvQYAAPAGoNcAAADeAPQaAADAG/x/V0S99ZTEC7YAAAAASUVORK5CYII=" alt="" />

//MultiProducerSequencer   Sequencer   
@Override
public long getHighestPublishedSequence(long lowerBound, long availableSequence)
{
for (long sequence = lowerBound; sequence <= availableSequence; sequence++)
{
if (!isAvailable(sequence))
{
return sequence - 1;//实际上实现了循环等待
}
} return availableSequence;
}
    @Override
public boolean isAvailable(long sequence)
{
int index = calculateIndex(sequence);
int flag = calculateAvailabilityFlag(sequence);
long bufferAddress = (index * SCALE) + BASE;
return UNSAFE.getIntVolatile(availableBuffer, bufferAddress) == flag;
}

 

5 disruptor.publishEvent(eventTranslator, msg);

    public <A> void publishEvent(final EventTranslatorOneArg<T, A> eventTranslator, A arg)
{
ringBuffer.publishEvent(eventTranslator, arg);
}
RingBuffer.class
public <A> void publishEvent(EventTranslatorOneArg<E, A> translator, A arg0)
{
final long sequence = sequencer.next();
translateAndPublish(translator, sequence, arg0);
}
  final long sequence = sequencer.next(); 
//MultiProducerSequencer
    public long next()
    {
        return next(1);
    }
  public long next(int n)
    {
        if (n < 1)
        {
            throw new IllegalArgumentException("n must be > 0");
        }         long current;
        long next;         do
        {
            current = cursor.get();
            next = current + n;             long wrapPoint = next - bufferSize;
            long cachedGatingSequence = gatingSequenceCache.get();             if (wrapPoint > cachedGatingSequence || cachedGatingSequence > current)
            {
                long gatingSequence = Util.getMinimumSequence(gatingSequences, current);                 if (wrapPoint > gatingSequence)
                {
                    LockSupport.parkNanos(1); // TODO, should we spin based on the wait strategy?
                    continue;
                }                 gatingSequenceCache.set(gatingSequence);
            }
            else if (cursor.compareAndSet(current, next))
            {
                break;
            }
        }
        while (true);         return next;
    }
 
    private void translateAndPublish(EventTranslator<E> translator, long sequence)
{
try
{
translator.translateTo(get(sequence), sequence);// 取位置 调用自定义类设置值
        //上面是自定义设置值类    
    // EventTranslatorOneArg<ValueEvent, String> eventTranslator = new EventTranslatorOneArg<ValueEvent, String>() {
     //   @Override
      //  public void translateTo(ValueEvent event, long sequence, String msg) {
      //      event.setValue(msg);
      //  }
    };
}
finally
{
sequencer.publish(sequence);
}
}
//   MultiProducerSequencer
public void publish(final long sequence)
    {
        setAvailable(sequence);//设置可用
        waitStrategy.signalAllWhenBlocking();
    }
//SingleProducerSequencer
    public void publish(long sequence)
    {
        cursor.set(sequence);//cursor就是 Sequence
        waitStrategy.signalAllWhenBlocking();
    }

 

Disruptor 创建过程的更多相关文章

  1. ASP.NET Web API 控制器创建过程(二)

    ASP.NET Web API 控制器创建过程(二) 前言 本来这篇随笔应该是在上周就该写出来发布的,由于身体跟不上节奏感冒发烧有心无力,这种天气感冒发烧生不如死,也真正的体会到了什么叫病来如山倒,病 ...

  2. ASP.NET Web API 控制器创建过程(一)

    ASP.NET Web API 控制器创建过程(一) 前言 在前面对管道.路由有了基础的了解过后,本篇将带大家一起学习一下在ASP.NET Web API中控制器的创建过程,这过程分为几个部分下面的内 ...

  3. Spring MVC 学习 -- 创建过程

    Spring MVC 学习 -- 创建过程 Spring MVC我们使用的时候会在web.xml中配置 <servlet> <servlet-name>SpringMVC< ...

  4. Web APi之过滤器创建过程原理解析【一】(十)

    前言 Web API的简单流程就是从请求到执行到Action并最终作出响应,但是在这个过程有一把[筛子],那就是过滤器Filter,在从请求到Action这整个流程中使用Filter来进行相应的处理从 ...

  5. .NET/ASP.NET MVC Controller 控制器(IController控制器的创建过程)

    阅读目录: 1.开篇介绍 2.ASP.NETMVC IControllerFactory 控制器工厂接口 3.ASP.NETMVC DefaultControllerFactory 默认控制器工厂 4 ...

  6. 图解JAVA对象的创建过程

    前面几篇博文分别介绍了JAVA的Class文件格式.JVM的类加载机制和JVM的内存模型,这里就索性把java对象的创建过程一并说完,这样java对象的整个创建过程就基本上说明白了(当然你要有基础才能 ...

  7. JVM中对象的创建过程

    JVM中对象的创建过程如以下流程图中所示: 对其主要步骤进行详细阐述: 为新生对象分配内存: 内存的分配方式: 指针碰撞:假设Java堆中内存是绝对规整的,所有用过的内存放在一边,空闲的内存在另一边, ...

  8. Java中对象创建过程

    本文介绍的对象创建过程仅限于普通Java对象,不包括数组和Class对象. 1.类加载检查 虚拟机遇到一条new指令时,首先去检查该指令的参数能否在常量池中定位到一个类的符号引用,并且检查这个符号引用 ...

  9. XMPie部署与创建过程 - 快速指南

    XMPie部署与创建过程 1PhotoShop.Indesign.VS2013关系.作用.使用 .1.1目的与过程 1. Photoshop负责导出cpkg文件. 1.1 动态性 如果你想要生成动态的 ...

随机推荐

  1. red-lang

    Red is a next-generation programming language strongly inspired by Rebol, but with a broader field o ...

  2. Oracle ORA-01033: 错误解决办法

    转自 Oracle ORA-01033: 错误解决办法

  3. cocurrent包 原子性数据类型

    22. 原子性布尔 AtomicBoolean AtomicBoolean 类为我们提供了一个可以用原子方式进行读和写的布尔值,它还拥有一些先进的原子性操作,比如 compareAndSet().At ...

  4. docker之人手一台服务器

    安装docker uname –r 检查内核版本 yum update 升级本地yum包 vim /etc/yum.repos.d/docker.repo #添加yum仓库配置 [dockerrepo ...

  5. 如何给JQ的ajax方法中的success()传入参数?

    当时在使用JQuery提供的Ajax技术的时候,我有个需求,就是要给它请求成功后调用的success()方法传入参数: 所以,我就直接这样子写了: <script> function ge ...

  6. 通过JBoss反序列化(CVE-2017-12149)浅谈Java反序列化漏洞

    前段时间学校学习J2EE,用到了jboss,顺便看了下jboss的反序列化,再浅谈下反序列化漏洞. Java序列化,简而言之就是把java对象转化为字节序列的过程.而反序列话则是再把字节序列恢复为ja ...

  7. iptables利用connlimit模块限制同一IP连接数

    connlimit功能: connlimit模块允许你限制每个客户端IP的并发连接数,即每个IP同时连接到一个服务器个数. connlimit模块主要可以限制内网用户的网络使用,对服务器而言则可以限制 ...

  8. MIT算法导论笔记

    详细MIT算法导论笔记 (网络链接) 第一讲:课程简介及算法分析 (Sheridan) 第二讲:渐近符号.递归及解法  (Sheridan) 第三讲:分治法(1)(Sheridan) 第四讲:快排及随 ...

  9. 使用BAT编译,链接,执行汇编代码

    大家都知道汇编程序(MASM)的上机过程,先要对源代码进行汇编. 连接,然后再执行,而这中间有很多环节需要输入很多东西,麻烦的很(只有经历过的朋友才懂得).如何使这个过程变的简单呢?在我们搞汇编课程设 ...

  10. SSO单点登录系列6:cas单点登录防止登出退出后刷新后退ticket失效报500错

    这个问题之前就发现过,最近有几个哥们一直在问我这个怎么搞,我手上在做另一个项目,cas就暂时搁浅了几周.现在我们来一起改一下你的应用(client2/3)的web.xml来解决这个2b问题,首先看下错 ...