org.axonframework.commandhandling.disruptor
Class EventPublisher
java.lang.Object
org.axonframework.commandhandling.disruptor.EventPublisher
- All Implemented Interfaces:
- com.lmax.disruptor.EventHandler<CommandHandlingEntry>
public class EventPublisher
- extends Object
- implements com.lmax.disruptor.EventHandler<CommandHandlingEntry>
Component of the DisruptorCommandBus that stores and publishes events generated by the command's execution.
- Since:
- 2.0
- Author:
- Allard Buijze
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EventPublisher
public 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
.
- Parameters:
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 handle
onEvent
public void onEvent(CommandHandlingEntry entry,
long sequence,
boolean endOfBatch)
throws Exception
- Specified by:
onEvent
in interface com.lmax.disruptor.EventHandler<CommandHandlingEntry>
- Throws:
Exception
Copyright © 2010-2016. All Rights Reserved.