public class SpringAggregateSnapshotter extends 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(EventStore eventStore,
                          ParameterResolverFactory parameterResolverFactory,
                          Executor executor,
                          TransactionManager txManager)
Initializes a snapshotter using the ParameterResolverFactory instances available on the classpath. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
protected AggregateFactory<?> | 
getAggregateFactory(Class<?> aggregateType)
Returns the AggregateFactory registered for the given  
aggregateType, or null if no such
 AggregateFactory is known. | 
void | 
setApplicationContext(org.springframework.context.ApplicationContext applicationContext)  | 
createSnapshot, registerAggregateFactorycreateSnapshotterTask, getEventStore, getExecutor, scheduleSnapshotpublic SpringAggregateSnapshotter(EventStore eventStore, ParameterResolverFactory parameterResolverFactory, Executor executor, 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 withClasspathParameterResolverFactoryprotected AggregateFactory<?> getAggregateFactory(Class<?> aggregateType)
AggregateSnapshotteraggregateType, or null if no such
 AggregateFactory is known.
 
 Sublasses may override this method to enhance how AggregateFactories are retrieved. They may choose to
 AggregateSnapshotter.registerAggregateFactory(AggregateFactory) if it hasn't been found using this implementation.
getAggregateFactory in class AggregateSnapshotteraggregateType - The type to get the AggregateFactory fornull if not foundpublic 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.