Class JdbcSagaStore.Builder
java.lang.Object
org.axonframework.modelling.saga.repository.jdbc.JdbcSagaStore.Builder
- Enclosing class:
JdbcSagaStore
Builder class to instantiate a
JdbcSagaStore.
The SagaSqlSchema is defaulted to an GenericSagaSqlSchema.
The ConnectionProvider and Converter are hard requirements and as such should be
provided.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Initializes aJdbcSagaStoreas specified through this Builder.connectionProvider(ConnectionProvider connectionProvider) Sets theConnectionProviderwhich provides access to a JDBC connection.Sets theConverterused to convert a Saga instance to and from its serialized form.sqlSchema(SagaSqlSchema sqlSchema) Sets theSagaSqlSchemadefining the SQL operations to execute for thisSagaStoreimplementation.protected voidvalidate()Validates whether the fields contained in this Builder are set accordingly.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
connectionProvider
Sets theConnectionProviderwhich provides access to a JDBC connection.- Parameters:
connectionProvider- aConnectionProviderwhich provides access to a JDBC connection- Returns:
- the current Builder instance, for fluent interfacing
-
sqlSchema
Sets theSagaSqlSchemadefining the SQL operations to execute for thisSagaStoreimplementation. Defaults to aGenericSagaSqlSchema.- Parameters:
sqlSchema- theSagaSqlSchemadefining the SQL operations to execute for thisSagaStoreimplementation- Returns:
- the current Builder instance, for fluent interfacing
-
converter
Sets theConverterused to convert a Saga instance to and from its serialized form.- Parameters:
converter- aConverterused to convert a Saga instance to and from its serialized form- Returns:
- the current Builder instance, for fluent interfacing
-
build
Initializes aJdbcSagaStoreas specified through this Builder.- Returns:
- a
JdbcSagaStoreas specified through this Builder
-
validate
Validates whether the fields contained in this Builder are set accordingly.- Throws:
AxonConfigurationException- if one field is asserted to be incorrect according to the Builder's specifications
-