Class SpringAggregateSnapshotter.Builder

Enclosing class:
SpringAggregateSnapshotter

public static class SpringAggregateSnapshotter.Builder extends AggregateSnapshotter.Builder
Builder class to instantiate a SpringAggregateSnapshotter. The AggregateFactory instances are lazily retrieved by the ApplicationContext.

The Executor is defaulted to an DirectExecutor.INSTANCE, the TransactionManager defaults to a NoTransactionManager and the SpanFactory defaults to a NoOpSpanFactory. Additionally, this Builder has convenience functions to default the ParameterResolverFactory and HandlerDefinition based on instances of these available on the classpath in case these are not provided (respectively AggregateSnapshotter.Builder.buildParameterResolverFactory() and AggregateSnapshotter.Builder.buildHandlerDefinition()). Upon instantiation of a AggregateSnapshotter, it is recommended to use these function to set those fields.

The EventStore is a hard requirement and as such should be provided.

See Also: