/// <summary> /// Set up batch handlers to handle events from the ring buffer. These handlers will only process events /// after every <see cref="IEventProcessor"/> in this group has processed the event. /// /// This method is generally used as part of a chain. For example if <code>A</code> must /// process events before<code> B</code>: /// <code>dw.After(A).HandleEventsWith(B);</code> /// </summary> /// <param name="handlers">the batch handlers that will process events.</param> /// <returns>a <see cref="EventHandlerGroup{T}"/> that can be used to set up a event processor barrier over the created event processors.</returns> public EventHandlerGroup <T> HandleEventsWith(params IEventHandler <T>[] handlers) => _disruptor.CreateEventProcessors(_sequences, handlers);
/// <summary> /// Set up batch handlers to handle events from the ring buffer. These handlers will only process events /// after every {@link EventProcessor} in this group has processed the event. /// /// <p>This method is generally used as part of a chain. For example if the handler <code>A</code> must /// process events before handler <code>B</code>:</p> /// /// <pre><code>dw.after(A).HandleEventsWith(B);</code></pre> /// </summary> /// <param name="handlers">the batch handlers that will process events.</param> /// <returns>a {@link EventHandlerGroup} that can be used to set up a event processor barrier over the created event processors.</returns> public EventHandlerGroup <T> HandleEventsWith(params IEventHandler <T>[] handlers) { return(disruptor.CreateEventProcessors(sequences, handlers)); }