Class LockingSagaRepository.Builder<T>
java.lang.Object
org.axonframework.modelling.saga.repository.LockingSagaRepository.Builder<T>
- Type Parameters:
T- a generic specifying the Saga type contained in thisSagaRepositoryimplementation
- Direct Known Subclasses:
AnnotatedSagaRepository.Builder
- Enclosing class:
LockingSagaRepository<T>
Abstract Builder class to instantiate
LockingSagaRepository implementations.
The LockFactory is defaulted to a pessimistic locking strategy, implemented in the PessimisticLockFactory.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlockFactory(LockFactory lockFactory) Sets theLockFactoryused to lock a saga.protected voidvalidate()Validates whether the fields contained in this Builder are set accordingly.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
lockFactory
Sets theLockFactoryused to lock a saga. Defaults to a pessimistic locking strategy, implemented in thePessimisticLockFactory.- Parameters:
lockFactory- aLockFactoryused to lock an aggregate- Returns:
- the current Builder instance, for fluent interfacing
-
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
-