public class EventPublisher extends Object implements com.lmax.disruptor.EventHandler<CommandHandlingEntry>
| Constructor and Description |
|---|
EventPublisher(EventStore eventStore,
EventBus eventBus,
Executor executor,
TransactionManager transactionManager,
RollbackConfiguration rollbackConfiguration,
int segmentId)
Initializes the EventPublisher to publish Events to the given
eventStore and eventBus
for aggregate of given aggregateType. |
public EventPublisher(EventStore eventStore, EventBus eventBus, Executor executor, TransactionManager transactionManager, RollbackConfiguration rollbackConfiguration, int segmentId)
eventStore and eventBus
for aggregate of given aggregateType.eventStore - The EventStore persisting the generated eventseventBus - The EventBus to publish events onexecutor - The executor which schedules response reportingtransactionManager - The transaction manager that manages the transaction around event storage and
publicationrollbackConfiguration - The configuration that indicates which exceptions should result in a UnitOfWorksegmentId - The ID of the segment this publisher should handlepublic void onEvent(CommandHandlingEntry entry, long sequence, boolean endOfBatch) throws Exception
onEvent in interface com.lmax.disruptor.EventHandler<CommandHandlingEntry>ExceptionCopyright © 2010-2014. All Rights Reserved.