public static class TrackingEventProcessor.Builder extends AbstractEventProcessor.Builder
TrackingEventProcessor.
The RollbackConfigurationType defaults to a RollbackConfigurationType.ANY_THROWABLE, the
ErrorHandler is defaulted to a PropagatingErrorHandler, the MessageMonitor defaults to a
NoOpMessageMonitor and the TrackingEventProcessorConfiguration to a
TrackingEventProcessorConfiguration.forSingleThreadedProcessing() call. The Event Processor name,
EventHandlerInvoker, StreamableMessageSource, TokenStore and TransactionManager
are hard requirements and as such should be provided.
name| Constructor and Description |
|---|
Builder() |
public TrackingEventProcessor.Builder name(String name)
AbstractEventProcessor.Buildername of this EventProcessor implementation.name in class AbstractEventProcessor.Buildername - a String defining this EventProcessor implementationpublic TrackingEventProcessor.Builder eventHandlerInvoker(EventHandlerInvoker eventHandlerInvoker)
AbstractEventProcessor.BuilderEventHandlerInvoker which will handle all the individual EventMessages.eventHandlerInvoker in class AbstractEventProcessor.BuildereventHandlerInvoker - the EventHandlerInvoker which will handle all the individual
EventMessagespublic TrackingEventProcessor.Builder rollbackConfiguration(RollbackConfiguration rollbackConfiguration)
RollbackConfiguration specifying the rollback behavior of the UnitOfWork while
processing a batch of events.. Defaults to a RollbackConfigurationType.ANY_THROWABLE)rollbackConfiguration in class AbstractEventProcessor.BuilderrollbackConfiguration - the RollbackConfiguration specifying the rollback behavior of the
UnitOfWork while processing a batch of events.public TrackingEventProcessor.Builder errorHandler(ErrorHandler errorHandler)
AbstractEventProcessor.BuilderErrorHandler invoked when an UnitOfWork is rolled back during processing. Defaults
to a PropagatingErrorHandler.errorHandler in class AbstractEventProcessor.BuildererrorHandler - the ErrorHandler invoked when an UnitOfWork is rolled back during
processingpublic TrackingEventProcessor.Builder messageMonitor(MessageMonitor<? super EventMessage<?>> messageMonitor)
AbstractEventProcessor.BuilderMessageMonitor to monitor EventMessages before and after they're processed. Defaults
to a NoOpMessageMonitor.messageMonitor in class AbstractEventProcessor.BuildermessageMonitor - a MessageMonitor to monitor EventMessages before and after they're
processedpublic TrackingEventProcessor.Builder messageSource(StreamableMessageSource<TrackedEventMessage<?>> messageSource)
messageSource - the StreamableMessageSource (e.g. the EventBus) which this EventProcessor will trackpublic TrackingEventProcessor.Builder tokenStore(TokenStore tokenStore)
TokenStore used to store and fetch event tokens that enable this EventProcessor to
track its progress.tokenStore - the TokenStore used to store and fetch event tokens that enable this EventProcessor to track its progresspublic TrackingEventProcessor.Builder transactionManager(TransactionManager transactionManager)
TransactionManager used when processing EventMessages.transactionManager - the TransactionManager used when processing EventMessagespublic TrackingEventProcessor.Builder trackingEventProcessorConfiguration(TrackingEventProcessorConfiguration trackingEventProcessorConfiguration)
TrackingEventProcessorConfiguration containing the fine grained configuration options for a
TrackingEventProcessor. Defaults to a
TrackingEventProcessorConfiguration.forSingleThreadedProcessing() call.trackingEventProcessorConfiguration - the TrackingEventProcessorConfiguration containing the
fine grained configuration options for a
TrackingEventProcessorpublic TrackingEventProcessor build()
TrackingEventProcessor as specified through this Builder.TrackingEventProcessor as specified through this Builderprotected void validate()
throws AxonConfigurationException
validate in class AbstractEventProcessor.BuilderAxonConfigurationException - if one field is asserted to be incorrect according to the Builder's
specificationsCopyright © 2010–2018. All rights reserved.