All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.lmax.disruptor.dsl.EventProcessorFactory Maven / Gradle / Ivy

There is a newer version: 1.50.0
Show newest version
package com.lmax.disruptor.dsl;

import com.lmax.disruptor.EventProcessor;
import com.lmax.disruptor.RingBuffer;
import com.lmax.disruptor.Sequence;

/**
 * A factory interface to make it possible to include custom event processors in a chain:
 *
 * 

 * disruptor.handleEventsWith(handler1).then((ringBuffer, barrierSequences) -> new CustomEventProcessor(ringBuffer, barrierSequences));
 * 
*/ public interface EventProcessorFactory { /** * Create a new event processor that gates on barrierSequences. * * @param ringBuffer the ring buffer to receive events from. * @param barrierSequences the sequences to gate on * @return a new EventProcessor that gates on barrierSequences before processing events */ EventProcessor createEventProcessor(RingBuffer ringBuffer, Sequence[] barrierSequences); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy