public abstract static class AbstractSnapshotter.Builder extends Object
AbstractSnapshotter implementations.
The Executor is defaulted to an DirectExecutor.INSTANCE, the TransactionManager defaults
to a NoTransactionManager, and the SpanFactory defaults to a NoOpSpanFactory. The
EventStore is a hard requirement and as such should be provided.
| Constructor and Description |
|---|
Builder() |
| Modifier and Type | Method and Description |
|---|---|
AbstractSnapshotter.Builder |
eventStore(EventStore eventStore)
Sets the
EventStore instance which this AbstractSnapshotter implementation will store
snapshots in. |
AbstractSnapshotter.Builder |
executor(Executor executor)
Sets the
Executor which handles the actual snapshot creation process. |
AbstractSnapshotter.Builder |
spanFactory(SpanFactory spanFactory)
Sets the
SpanFactory implementation to use for providing tracing capabilities. |
AbstractSnapshotter.Builder |
transactionManager(TransactionManager transactionManager)
Sets the
TransactionManager used to manage the transaction around storing the snapshot. |
protected void |
validate()
Validates whether the fields contained in this Builder are set accordingly.
|
public AbstractSnapshotter.Builder eventStore(EventStore eventStore)
EventStore instance which this AbstractSnapshotter implementation will store
snapshots in.eventStore - the EventStore instance which this AbstractSnapshotter implementation will
store snapshots inpublic AbstractSnapshotter.Builder executor(Executor executor)
Executor which handles the actual snapshot creation process. Defaults to a
DirectExecutor.executor - an Executor which handles the actual snapshot creation processpublic AbstractSnapshotter.Builder spanFactory(@Nonnull SpanFactory spanFactory)
SpanFactory implementation to use for providing tracing capabilities. Defaults to a
NoOpSpanFactory by default, which provides no tracing capabilities.spanFactory - The SpanFactory implementation.public AbstractSnapshotter.Builder transactionManager(TransactionManager transactionManager)
TransactionManager used to manage the transaction around storing the snapshot. Defaults to a
NoTransactionManager.transactionManager - the TransactionManager used to manage the transaction around storing the
snapshotprotected void validate()
throws AxonConfigurationException
AxonConfigurationException - if one field is asserted to be incorrect according to the Builder's
specificationsCopyright © 2010–2023. All rights reserved.