Saga Repository Port
Persistence-agnostic repository port for saga aggregates.
Concrete adapters (JPA, MongoDB, …) implement this interface; the saga engine has no awareness of the underlying storage technology.
Inheritors
Functions
Link copied to clipboard
Returns sagas whose Saga.startedAt is strictly before startedAt.
Link copied to clipboard
Returns all sagas currently in the given SagaStatus.
Link copied to clipboard
abstract fun findByStatusInAndStartedAtBefore(statuses: List<SagaStatus>, startedAt: Instant): List<S>
Returns sagas in any of statuses whose Saga.startedAt is strictly before startedAt.
Link copied to clipboard
abstract fun findByStatusInAndUpdatedAtBefore(statuses: List<SagaStatus>, updatedAt: Instant): List<S>
Finds sagas whose Saga.status is in statuses and whose Saga.updatedAt is strictly before updatedAt. Used by the saga watchdog to detect AWAITING_RESPONSE timeouts and to schedule compensation retries with a cooldown.
Link copied to clipboard
Returns all sagas of the given Saga.type.
Link copied to clipboard
Link copied to clipboard
Looks up a saga by its Saga.id; null if absent.