E - An implementation of EventMessage within the DeadLetter this factory constructs
PreparedStatements for.protected static class DefaultDeadLetterStatementFactory.Builder<E extends EventMessage<?>> extends Object
DefaultDeadLetterStatementFactory.
The schema is defaulted to a DeadLetterSchema.defaultSchema().
The generic Serializer and
event Serializer are hard requirements and should be provided.
| Modifier | Constructor and Description |
|---|---|
protected |
Builder() |
| Modifier and Type | Method and Description |
|---|---|
DefaultDeadLetterStatementFactory<E> |
build()
Initializes a
DefaultDeadLetterStatementFactory as specified through this Builder. |
DefaultDeadLetterStatementFactory.Builder<E> |
eventSerializer(Serializer eventSerializer)
Sets the
Serializer to serialize the event payload,
MetaData, and diagnostics of the
DeadLetter when storing it to a database. |
DefaultDeadLetterStatementFactory.Builder<E> |
genericSerializer(Serializer genericSerializer)
Sets the
Serializer to serialize the TrackingToken of a TrackedEventMessage instance
in the DeadLetter when storing it to the database. |
DefaultDeadLetterStatementFactory.Builder<E> |
schema(DeadLetterSchema schema)
Sets the given
schema used to define the table and column names used when constructing all
PreparedStatements. |
protected void |
validate()
Validate whether the fields contained in this Builder are set accordingly.
|
public DefaultDeadLetterStatementFactory.Builder<E> schema(DeadLetterSchema schema)
schema used to define the table and column names used when constructing all
PreparedStatements. Defaults to a DeadLetterSchema.defaultSchema().schema - The DeadLetterSchema used to define the table and column names used when constructing
all PreparedStatements.public DefaultDeadLetterStatementFactory.Builder<E> genericSerializer(Serializer genericSerializer)
Serializer to serialize the TrackingToken of a TrackedEventMessage instance
in the DeadLetter when storing it to the database.genericSerializer - The serializer to use for TrackingTokens in a
TrackedEventMessage.public DefaultDeadLetterStatementFactory.Builder<E> eventSerializer(Serializer eventSerializer)
Serializer to serialize the event payload,
MetaData, and diagnostics of the
DeadLetter when storing it to a database.eventSerializer - The serializer to use for event payloads,
MetaData instances, and
diagnostics.public DefaultDeadLetterStatementFactory<E> build()
DefaultDeadLetterStatementFactory as specified through this Builder.DefaultDeadLetterStatementFactory as specified through this Builder.protected void validate()
AxonConfigurationException - When one field asserts to be incorrect according to the Builder's
specifications.Copyright © 2010–2025. All rights reserved.