Package com.lmax.disruptor.dsl
Class ConsumerRepository<T>
java.lang.Object
com.lmax.disruptor.dsl.ConsumerRepository<T>
- Type Parameters:
T- the type of theEventHandler
- All Implemented Interfaces:
Iterable<ConsumerInfo>
Provides a repository mechanism to associate
EventHandlers with EventProcessors-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Collection<ConsumerInfo> private final Map<EventHandler<?>, EventProcessorInfo<T>> private final Map<Sequence, ConsumerInfo> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(EventProcessor processor) voidadd(EventProcessor eventprocessor, EventHandler<? super T> handler, SequenceBarrier barrier) voidadd(WorkerPool<T> workerPool, SequenceBarrier sequenceBarrier) getBarrierFor(EventHandler<T> handler) getEventProcessorFor(EventHandler<T> handler) private EventProcessorInfo<T> getEventProcessorInfo(EventHandler<T> handler) private ConsumerInfogetEventProcessorInfo(Sequence barrierEventProcessor) Sequence[]getLastSequenceInChain(boolean includeStopped) getSequenceFor(EventHandler<T> handler) iterator()voidunMarkEventProcessorsAsEndOfChain(Sequence... barrierEventProcessors) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
eventProcessorInfoByEventHandler
-
eventProcessorInfoBySequence
-
consumerInfos
-
-
Constructor Details
-
ConsumerRepository
ConsumerRepository()
-
-
Method Details
-
add
public void add(EventProcessor eventprocessor, EventHandler<? super T> handler, SequenceBarrier barrier) -
add
-
add
-
getLastSequenceInChain
-
getEventProcessorFor
-
getSequenceFor
-
unMarkEventProcessorsAsEndOfChain
-
iterator
-
getBarrierFor
-
getEventProcessorInfo
-
getEventProcessorInfo
-