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 this SagaRepository implementation
Direct Known Subclasses:
AnnotatedSagaRepository.Builder
Enclosing class:
LockingSagaRepository<T>

public abstract static class LockingSagaRepository.Builder<T> extends Object
Abstract Builder class to instantiate LockingSagaRepository implementations.

The LockFactory is defaulted to a pessimistic locking strategy, implemented in the PessimisticLockFactory.

  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • lockFactory

      public LockingSagaRepository.Builder<T> lockFactory(org.axonframework.common.lock.LockFactory lockFactory)
      Sets the LockFactory used to lock a saga. Defaults to a pessimistic locking strategy, implemented in the PessimisticLockFactory.
      Parameters:
      lockFactory - a LockFactory used to lock an aggregate
      Returns:
      the current Builder instance, for fluent interfacing
    • validate

      protected void validate() throws org.axonframework.common.AxonConfigurationException
      Validates whether the fields contained in this Builder are set accordingly.
      Throws:
      org.axonframework.common.AxonConfigurationException - if one field is asserted to be incorrect according to the Builder's specifications