SagaStepRepositoryPort

Persistence-agnostic repository port for saga step records.

Concrete adapters (JPA, MongoDB, …) implement this interface.

Inheritors

Functions

Link copied to clipboard
abstract fun findByCompensationStepId(compensationStepId: Long): T?

Returns the compensation step that reverted the original step with id compensationStepId; null if not yet compensated.

Link copied to clipboard
abstract fun findBySagaId(sagaId: String): List<T>

Returns every step recorded for the given saga, in insertion order.

Link copied to clipboard
abstract fun findBySagaIdAndStatus(sagaId: String, status: SagaStepStatus): List<T>

Returns the steps for sagaId currently in the given status.

Link copied to clipboard
abstract fun findBySagaIdAndStepName(sagaId: String, stepName: String): List<T>

Returns the steps for sagaId whose SagaStep.stepName equals stepName (typically zero or one).

Link copied to clipboard
abstract fun findByStepNameAndStatus(stepName: String, status: SagaStepStatus): List<T>

Returns steps with the given stepName in the given status across all sagas.

Link copied to clipboard
abstract fun findOneById(id: Long): T?

Looks up a step by its surrogate id; null if absent.

Link copied to clipboard
abstract fun save(step: T): T

Persists step (insert or update) and returns the stored instance.