public class SpringAggregateSnapshotter
extends org.axonframework.eventsourcing.AggregateSnapshotter
implements org.springframework.context.ApplicationContextAware
AggregateSnapshotter, this implementation lazily retrieves AggregateFactories from the Application
Context when snapshot requests are made.
Instead of configuring directly, consider using the SpringAggregateSnapshotterFactoryBean, which
configures this class using values available in the application context.
SpringAggregateSnapshotterFactoryBean| Constructor and Description |
|---|
SpringAggregateSnapshotter(org.axonframework.eventsourcing.eventstore.EventStore eventStore,
org.axonframework.messaging.annotation.ParameterResolverFactory parameterResolverFactory,
Executor executor,
org.axonframework.common.transaction.TransactionManager txManager)
Initializes a snapshotter.
|
SpringAggregateSnapshotter(org.axonframework.eventsourcing.eventstore.EventStore eventStore,
org.axonframework.messaging.annotation.ParameterResolverFactory parameterResolverFactory,
org.axonframework.messaging.annotation.HandlerDefinition handlerDefinition,
Executor executor,
org.axonframework.common.transaction.TransactionManager txManager,
org.axonframework.commandhandling.model.RepositoryProvider repositoryProvider)
Initializes a snapshotter using the ParameterResolverFactory instances available on the classpath.
|
| Modifier and Type | Method and Description |
|---|---|
protected org.axonframework.eventsourcing.AggregateFactory<?> |
getAggregateFactory(Class<?> aggregateType) |
void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext) |
createSnapshot, registerAggregateFactorypublic SpringAggregateSnapshotter(org.axonframework.eventsourcing.eventstore.EventStore eventStore,
org.axonframework.messaging.annotation.ParameterResolverFactory parameterResolverFactory,
Executor executor,
org.axonframework.common.transaction.TransactionManager txManager)
eventStore - The Event Store to store snapshots inparameterResolverFactory - The parameterResolverFactory used to reconstruct aggregatesexecutor - The executor that processes the snapshotting requeststxManager - The transaction manager to manage the persistence transactions withpublic SpringAggregateSnapshotter(org.axonframework.eventsourcing.eventstore.EventStore eventStore,
org.axonframework.messaging.annotation.ParameterResolverFactory parameterResolverFactory,
org.axonframework.messaging.annotation.HandlerDefinition handlerDefinition,
Executor executor,
org.axonframework.common.transaction.TransactionManager txManager,
org.axonframework.commandhandling.model.RepositoryProvider repositoryProvider)
eventStore - The Event Store to store snapshots inparameterResolverFactory - The parameterResolverFactory used to reconstruct aggregateshandlerDefinition - The handler definition used to create concrete handlersexecutor - The executor that processes the snapshotting requeststxManager - The transaction manager to manage the persistence transactions withrepositoryProvider - Provides repositories for specific aggregate typesprotected org.axonframework.eventsourcing.AggregateFactory<?> getAggregateFactory(Class<?> aggregateType)
getAggregateFactory in class org.axonframework.eventsourcing.AggregateSnapshotterpublic void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
throws org.springframework.beans.BeansException
setApplicationContext in interface org.springframework.context.ApplicationContextAwareorg.springframework.beans.BeansExceptionCopyright © 2010–2018. All rights reserved.