@Test public void shouldMakeEntriesAvailableToFirstHandlersImmediately() throws Exception { CountDownLatch countDownLatch = new CountDownLatch(2); MultiEventProcessor multiEventProcessor = new StubEventProcessor(countDownLatch); disruptor.handleEventsWith(createDelayedEventHandler(), multiEventProcessor); ensureTwoEventsProcessedAccordingToDependencies(countDownLatch); }
public MultiEventHandlerGroup<T> handleEventsWith(final MultiEventProcessor... processors){ final Sequence[] barrierSequences = new Sequence[0]; return createEventProcessors(barrierSequences, processors); }
MultiEventDisruptor { public MultiEventHandlerGroup<T> handleEventsWith(final MultiEventProcessor... processors){ final Sequence[] barrierSequences = new Sequence[0]; return createEventProcessors(barrierSequences, processors); } }
MultiEventDisruptor { public MultiEventHandlerGroup<T> handleEventsWith(final MultiEventProcessor... processors){ final Sequence[] barrierSequences = new Sequence[0]; return createEventProcessors(barrierSequences, processors); } MultiEventDisruptor(final EventFactory<T> eventFactory,
                               final int ringBufferSize,
                               final Executor executor);  MultiEventDisruptor(final ProducerType producerType,
                               final EventFactory<T> eventFactory,
                               final int ringBufferSize,
                               final Executor executor); private  MultiEventDisruptor(final RingBuffer<T> ringBuffer,
                                final Executor executor); }
MultiEventDisruptor { public MultiEventHandlerGroup<T> handleEventsWith(final MultiEventProcessor... processors){ final Sequence[] barrierSequences = new Sequence[0]; return createEventProcessors(barrierSequences, processors); } MultiEventDisruptor(final EventFactory<T> eventFactory,
                               final int ringBufferSize,
                               final Executor executor);  MultiEventDisruptor(final ProducerType producerType,
                               final EventFactory<T> eventFactory,
                               final int ringBufferSize,
                               final Executor executor); private  MultiEventDisruptor(final RingBuffer<T> ringBuffer,
                                final Executor executor); MultiEventHandlerGroup<T> handleEventsWith(final MultiEventProcessor... processors); MultiEventHandlerGroup<T> handleEventsWithWorkerPool(final WorkHandler<T>... workHandlers); void handleExceptionsWith(final ExceptionHandler<? super T> exceptionHandler); MultiEventHandlerGroup<T> after(final MultiEventProcessor... processors); void publishEvent(final EventTranslator<T> eventTranslator); void publishEvent(final EventTranslatorOneArg<T, A> eventTranslator, final A arg); void publishEvents(final EventTranslatorOneArg<T, A> eventTranslator, final A[] arg); RingBuffer<T> start(); void halt(); void shutdown(); void shutdown(final long timeout, final TimeUnit timeUnit); RingBuffer<T> getRingBuffer(); long getCursor(); long getBufferSize(); T get(final long sequence); SequenceBarrier getBarrierFor(final EventHandler<T> handler); }
MultiEventDisruptor { public MultiEventHandlerGroup<T> handleEventsWith(final MultiEventProcessor... processors){ final Sequence[] barrierSequences = new Sequence[0]; return createEventProcessors(barrierSequences, processors); } MultiEventDisruptor(final EventFactory<T> eventFactory,
                               final int ringBufferSize,
                               final Executor executor);  MultiEventDisruptor(final ProducerType producerType,
                               final EventFactory<T> eventFactory,
                               final int ringBufferSize,
                               final Executor executor); private  MultiEventDisruptor(final RingBuffer<T> ringBuffer,
                                final Executor executor); MultiEventHandlerGroup<T> handleEventsWith(final MultiEventProcessor... processors); MultiEventHandlerGroup<T> handleEventsWithWorkerPool(final WorkHandler<T>... workHandlers); void handleExceptionsWith(final ExceptionHandler<? super T> exceptionHandler); MultiEventHandlerGroup<T> after(final MultiEventProcessor... processors); void publishEvent(final EventTranslator<T> eventTranslator); void publishEvent(final EventTranslatorOneArg<T, A> eventTranslator, final A arg); void publishEvents(final EventTranslatorOneArg<T, A> eventTranslator, final A[] arg); RingBuffer<T> start(); void halt(); void shutdown(); void shutdown(final long timeout, final TimeUnit timeUnit); RingBuffer<T> getRingBuffer(); long getCursor(); long getBufferSize(); T get(final long sequence); SequenceBarrier getBarrierFor(final EventHandler<T> handler);  }