public static interface JdbcReadSide.ReadSideHandlerBuilder<Event extends AggregateEvent<Event>>
Modifier and Type | Method and Description |
---|---|
ReadSideProcessor.ReadSideHandler<Event> |
build()
Build the read side handler.
|
<E extends Event> |
setEventHandler(Class<E> eventClass,
JdbcReadSide.ConnectionBiConsumer<E> handler)
Define the event handler that will be used for events of a given class.
|
<E extends Event> |
setEventHandler(Class<E> eventClass,
JdbcReadSide.ConnectionTriConsumer<E,Offset> handler)
Define the event handler that will be used for events of a given class.
|
JdbcReadSide.ReadSideHandlerBuilder<Event> |
setGlobalPrepare(JdbcReadSide.ConnectionConsumer callback)
Set a global prepare callback.
|
JdbcReadSide.ReadSideHandlerBuilder<Event> |
setPrepare(JdbcReadSide.ConnectionBiConsumer<AggregateEventTag<Event>> callback)
Set a prepare callback.
|
JdbcReadSide.ReadSideHandlerBuilder<Event> setGlobalPrepare(JdbcReadSide.ConnectionConsumer callback)
callback
- The callback.ReadSideProcessor.ReadSideHandler.globalPrepare()
JdbcReadSide.ReadSideHandlerBuilder<Event> setPrepare(JdbcReadSide.ConnectionBiConsumer<AggregateEventTag<Event>> callback)
callback
- The callback.ReadSideProcessor.ReadSideHandler.prepare(AggregateEventTag)
<E extends Event> JdbcReadSide.ReadSideHandlerBuilder<Event> setEventHandler(Class<E> eventClass, JdbcReadSide.ConnectionBiConsumer<E> handler)
eventClass
- The event class to handle.handler
- The function to handle the events.<E extends Event> JdbcReadSide.ReadSideHandlerBuilder<Event> setEventHandler(Class<E> eventClass, JdbcReadSide.ConnectionTriConsumer<E,Offset> handler)
eventClass
- The event class to handle.handler
- The function to handle the events.ReadSideProcessor.ReadSideHandler<Event> build()