public static class SpringAggregateSnapshotter.Builder
extends org.axonframework.eventsourcing.AggregateSnapshotter.Builder
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.
ClasspathParameterResolverFactory,
ClasspathHandlerDefinition| Constructor and Description |
|---|
Builder() |
| Modifier and Type | Method and Description |
|---|---|
SpringAggregateSnapshotter |
build()
Initializes a
SpringAggregateSnapshotter as specified through this Builder. |
SpringAggregateSnapshotter.Builder |
eventStore(org.axonframework.eventsourcing.eventstore.EventStore eventStore) |
SpringAggregateSnapshotter.Builder |
executor(Executor executor) |
SpringAggregateSnapshotter.Builder |
handlerDefinition(org.axonframework.messaging.annotation.HandlerDefinition handlerDefinition) |
SpringAggregateSnapshotter.Builder |
parameterResolverFactory(org.axonframework.messaging.annotation.ParameterResolverFactory parameterResolverFactory) |
SpringAggregateSnapshotter.Builder |
repositoryProvider(org.axonframework.modelling.command.RepositoryProvider repositoryProvider) |
SpringAggregateSnapshotter.Builder |
spanFactory(org.axonframework.tracing.SpanFactory spanFactory) |
SpringAggregateSnapshotter.Builder |
transactionManager(org.axonframework.common.transaction.TransactionManager transactionManager) |
protected void |
validate()
Validates whether the fields contained in this Builder are set accordingly.
|
public SpringAggregateSnapshotter.Builder eventStore(org.axonframework.eventsourcing.eventstore.EventStore eventStore)
eventStore in class org.axonframework.eventsourcing.AggregateSnapshotter.Builderpublic SpringAggregateSnapshotter.Builder executor(Executor executor)
executor in class org.axonframework.eventsourcing.AggregateSnapshotter.Builderpublic SpringAggregateSnapshotter.Builder transactionManager(org.axonframework.common.transaction.TransactionManager transactionManager)
transactionManager in class org.axonframework.eventsourcing.AggregateSnapshotter.Builderpublic SpringAggregateSnapshotter.Builder repositoryProvider(org.axonframework.modelling.command.RepositoryProvider repositoryProvider)
repositoryProvider in class org.axonframework.eventsourcing.AggregateSnapshotter.Builderpublic SpringAggregateSnapshotter.Builder parameterResolverFactory(org.axonframework.messaging.annotation.ParameterResolverFactory parameterResolverFactory)
parameterResolverFactory in class org.axonframework.eventsourcing.AggregateSnapshotter.Builderpublic SpringAggregateSnapshotter.Builder handlerDefinition(org.axonframework.messaging.annotation.HandlerDefinition handlerDefinition)
handlerDefinition in class org.axonframework.eventsourcing.AggregateSnapshotter.Builderpublic SpringAggregateSnapshotter.Builder spanFactory(@Nonnull org.axonframework.tracing.SpanFactory spanFactory)
spanFactory in class org.axonframework.eventsourcing.AggregateSnapshotter.Builderpublic SpringAggregateSnapshotter build()
SpringAggregateSnapshotter as specified through this Builder.build in class org.axonframework.eventsourcing.AggregateSnapshotter.BuilderSpringAggregateSnapshotter as specified through this Builderprotected void validate()
throws org.axonframework.common.AxonConfigurationException
validate in class org.axonframework.eventsourcing.AggregateSnapshotter.Builderorg.axonframework.common.AxonConfigurationException - if one field is asserted to be incorrect according to the Builder's
specificationsCopyright © 2010–2023. All rights reserved.