com.couchbase.client.deps.com.lmax.disruptor.dsl.EventProcessorFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of core-io Show documentation
Show all versions of core-io Show documentation
The official Couchbase JVM Core IO Library
package com.couchbase.client.deps.com.lmax.disruptor.dsl;
import com.couchbase.client.deps.com.lmax.disruptor.EventProcessor;
import com.couchbase.client.deps.com.lmax.disruptor.RingBuffer;
import com.couchbase.client.deps.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 barrierSequences the sequences to gate on
* @return a new EventProcessor that gates on barrierSequences
before processing events
*/
EventProcessor createEventProcessor(RingBuffer ringBuffer, Sequence[] barrierSequences);
}