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
EventHandler
s with EventProcessor
s-
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 TypeMethodDescriptionvoid
add
(EventProcessor processor) void
add
(EventProcessor eventprocessor, EventHandler<? super T> handler, SequenceBarrier barrier) void
add
(WorkerPool<T> workerPool, SequenceBarrier sequenceBarrier) getBarrierFor
(EventHandler<T> handler) getEventProcessorFor
(EventHandler<T> handler) private EventProcessorInfo
<T> getEventProcessorInfo
(EventHandler<T> handler) private ConsumerInfo
getEventProcessorInfo
(Sequence barrierEventProcessor) Sequence[]
getLastSequenceInChain
(boolean includeStopped) getSequenceFor
(EventHandler<T> handler) iterator()
void
unMarkEventProcessorsAsEndOfChain
(Sequence... barrierEventProcessors) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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
-