|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.axonframework.eventsourcing.AbstractSnapshotter
org.axonframework.eventsourcing.AggregateSnapshotter
org.axonframework.eventsourcing.SpringAggregateSnapshotter
public class SpringAggregateSnapshotter
Implementation of the AggregateSnapshotter that eases the configuration when
used within a Spring Application Context. It will automatically detect a Transaction Manager and Aggregate
Factories.
AbstractSnapshotter.setEventStore(org.axonframework.eventstore.SnapshotEventStore). In
most cases, you should also provide an executor, as the default will execute snapshotter tasks in the calling
thread.
| Constructor Summary | |
|---|---|
SpringAggregateSnapshotter()
|
|
| Method Summary | |
|---|---|
void |
afterPropertiesSet()
|
protected Runnable |
createSnapshotterTask(String typeIdentifier,
AggregateIdentifier aggregateIdentifier)
Creates an instance of a task that contains the actual snapshot creation logic. |
void |
setAggregateFactories(List<AggregateFactory<?>> aggregateFactories)
Optionally sets the aggregate factories to use. |
void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
|
void |
setTransactionDefinition(org.springframework.transaction.TransactionDefinition transactionDefinition)
Optionally sets the transaction definition to use. |
void |
setTransactionManager(org.springframework.transaction.PlatformTransactionManager transactionManager)
Sets the transaction manager to manager underlying transaction with. |
| Methods inherited from class org.axonframework.eventsourcing.AggregateSnapshotter |
|---|
createSnapshot |
| Methods inherited from class org.axonframework.eventsourcing.AbstractSnapshotter |
|---|
getEventStore, getExecutor, scheduleSnapshot, setEventStore, setExecutor |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SpringAggregateSnapshotter()
| Method Detail |
|---|
protected Runnable createSnapshotterTask(String typeIdentifier,
AggregateIdentifier aggregateIdentifier)
AbstractSnapshotter
createSnapshotterTask in class AbstractSnapshottertypeIdentifier - The type of the aggregate to create a snapshot foraggregateIdentifier - The identifier of the aggregate to create a snapshot for
public void setTransactionManager(org.springframework.transaction.PlatformTransactionManager transactionManager)
transactionManager - the transaction manager managing underlying transactionspublic void setTransactionDefinition(org.springframework.transaction.TransactionDefinition transactionDefinition)
DefaultTransactionDefinition).
transactionDefinition - the transaction definition to use
public void afterPropertiesSet()
throws Exception
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanExceptionpublic void setAggregateFactories(List<AggregateFactory<?>> aggregateFactories)
setAggregateFactories in class AggregateSnapshotteraggregateFactories - The list of aggregate factories creating the aggregates to store.
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
throws org.springframework.beans.BeansException
setApplicationContext in interface org.springframework.context.ApplicationContextAwareorg.springframework.beans.BeansException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||