public static interface CassandraReadSide.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,
BiFunction<E,Offset,CompletionStage<List<com.datastax.driver.core.BoundStatement>>> handler)
Define the event handler that will be used for events of a given class.
|
<E extends Event> |
setEventHandler(Class<E> eventClass,
Function<E,CompletionStage<List<com.datastax.driver.core.BoundStatement>>> handler)
Define the event handler that will be used for events of a given class.
|
CassandraReadSide.ReadSideHandlerBuilder<Event> |
setGlobalPrepare(Supplier<CompletionStage<akka.Done>> callback)
Set a global prepare callback.
|
CassandraReadSide.ReadSideHandlerBuilder<Event> |
setPrepare(Function<AggregateEventTag<Event>,CompletionStage<akka.Done>> callback)
Set a prepare callback.
|
CassandraReadSide.ReadSideHandlerBuilder<Event> setGlobalPrepare(Supplier<CompletionStage<akka.Done>> callback)
callback
- The callback.ReadSideProcessor.ReadSideHandler.globalPrepare()
CassandraReadSide.ReadSideHandlerBuilder<Event> setPrepare(Function<AggregateEventTag<Event>,CompletionStage<akka.Done>> callback)
callback
- The callback.ReadSideProcessor.ReadSideHandler.prepare(AggregateEventTag)
<E extends Event> CassandraReadSide.ReadSideHandlerBuilder<Event> setEventHandler(Class<E> eventClass, Function<E,CompletionStage<List<com.datastax.driver.core.BoundStatement>>> handler)
eventClass
- The event class to handle.handler
- The function to handle the events.<E extends Event> CassandraReadSide.ReadSideHandlerBuilder<Event> setEventHandler(Class<E> eventClass, BiFunction<E,Offset,CompletionStage<List<com.datastax.driver.core.BoundStatement>>> handler)
eventClass
- The event class to handle.handler
- The function to handle the events.ReadSideProcessor.ReadSideHandler<Event> build()