public abstract static class AbstractEventStorageEngine.Builder extends Object
AbstractEventStorageEngine.
The Serializer used for snapshots is defaulted to a XStreamSerializer, the EventUpcaster
defaults to a NoOpEventUpcaster, the Serializer used for events is also defaulted to a XStreamSerializer
and the snapshotFilter defaults to a Predicate which returns true regardless.
| Modifier and Type | Field and Description |
|---|---|
protected EventUpcaster |
upcasterChain |
| Constructor and Description |
|---|
Builder() |
| Modifier and Type | Method and Description |
|---|---|
AbstractEventStorageEngine.Builder |
eventSerializer(Serializer eventSerializer)
Sets the
Serializer used to serialize and deserialize the Event Message's payload and Meta Data with. |
AbstractEventStorageEngine.Builder |
persistenceExceptionResolver(PersistenceExceptionResolver persistenceExceptionResolver)
Sets the
PersistenceExceptionResolver used to detect concurrency exceptions from the backing
database. |
AbstractEventStorageEngine.Builder |
snapshotFilter(Predicate<? super DomainEventData<?>> snapshotFilter)
Sets the
snapshotFilter deciding whether to take a snapshot into account. |
AbstractEventStorageEngine.Builder |
snapshotSerializer(Serializer snapshotSerializer)
Sets the
Serializer used to serialize and deserialize snapshots. |
AbstractEventStorageEngine.Builder |
upcasterChain(EventUpcaster upcasterChain)
Sets the
EventUpcaster used to deserialize events of older revisions. |
protected void |
validate()
Validates whether the fields contained in this Builder are set accordingly.
|
protected EventUpcaster upcasterChain
public AbstractEventStorageEngine.Builder snapshotSerializer(Serializer snapshotSerializer)
Serializer used to serialize and deserialize snapshots. Defaults to a
XStreamSerializer.snapshotSerializer - a Serializer used to serialize and deserialize snapshotspublic AbstractEventStorageEngine.Builder upcasterChain(EventUpcaster upcasterChain)
EventUpcaster used to deserialize events of older revisions. Defaults to a
NoOpEventUpcaster.upcasterChain - an EventUpcaster used to deserialize events of older revisionspublic AbstractEventStorageEngine.Builder persistenceExceptionResolver(PersistenceExceptionResolver persistenceExceptionResolver)
PersistenceExceptionResolver used to detect concurrency exceptions from the backing
database. If the persistenceExceptionResolver is not specified, persistence exceptions are not
explicitly resolved.persistenceExceptionResolver - the PersistenceExceptionResolver used to detect concurrency
exceptions from the backing databasepublic AbstractEventStorageEngine.Builder eventSerializer(Serializer eventSerializer)
Serializer used to serialize and deserialize the Event Message's payload and Meta Data with.
Defaults to a XStreamSerializer.eventSerializer - The serializer to serialize the Event Message's payload and Meta Data withpublic AbstractEventStorageEngine.Builder snapshotFilter(Predicate<? super DomainEventData<?>> snapshotFilter)
snapshotFilter deciding whether to take a snapshot into account. Can be set to filter out
specific snapshot revisions which should not be applied. Defaults to a Predicate which returns
true regardless.snapshotFilter - a Predicate which decides whether to take a snapshot into accountprotected void validate()
throws AxonConfigurationException
AxonConfigurationException - if one field is asserted to be incorrect according to the Builder's
specificationsCopyright © 2010–2018. All rights reserved.