Package com.lmax.disruptor.dsl
Class ConsumerRepository
java.lang.Object
com.lmax.disruptor.dsl.ConsumerRepository
Provides a repository mechanism to associate
EventHandlers with EventProcessors-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Collection<ConsumerInfo> private final Map<EventHandlerIdentity, EventProcessorInfo> private final Map<Sequence, ConsumerInfo> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(EventProcessor processor) voidadd(EventProcessor eventprocessor, EventHandlerIdentity handlerIdentity, SequenceBarrier barrier) getBarrierFor(EventHandlerIdentity handlerIdentity) getEventProcessorFor(EventHandlerIdentity handlerIdentity) private EventProcessorInfogetEventProcessorInfo(EventHandlerIdentity handlerIdentity) private ConsumerInfogetEventProcessorInfo(Sequence barrierEventProcessor) getSequenceFor(EventHandlerIdentity handlerIdentity) voidhaltAll()booleanhasBacklog(long cursor, boolean includeStopped) voidstartAll(ThreadFactory threadFactory) voidunMarkEventProcessorsAsEndOfChain(Sequence... barrierEventProcessors)
-
Field Details
-
eventProcessorInfoByEventHandler
-
eventProcessorInfoBySequence
-
consumerInfos
-
-
Constructor Details
-
ConsumerRepository
ConsumerRepository()
-
-
Method Details
-
add
public void add(EventProcessor eventprocessor, EventHandlerIdentity handlerIdentity, SequenceBarrier barrier) -
add
-
startAll
-
haltAll
public void haltAll() -
hasBacklog
public boolean hasBacklog(long cursor, boolean includeStopped) -
getEventProcessorFor
-
getSequenceFor
-
unMarkEventProcessorsAsEndOfChain
-
getBarrierFor
-
getEventProcessorInfo
-
getEventProcessorInfo
-