Base Saga Repository
JPA flavor of SagaRepositoryPort. Concrete service repositories extend this interface, and Spring Data JPA generates implementations that simultaneously satisfy the persistence-agnostic port.
Adding a new persistence flavor (e.g. MongoDB) only requires implementing SagaRepositoryPort directly with the target technology — the saga engine is unchanged.
Functions
Returns sagas whose Saga.startedAt is strictly before startedAt.
Returns all sagas currently in the given SagaStatus.
Returns sagas in any of statuses whose Saga.startedAt is strictly before startedAt.
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.
Returns all sagas of the given Saga.type.
Looks up a saga by its Saga.id; null if absent.