Interface OutboxRecordRepository
-
- All Implemented Interfaces:
public interface OutboxRecordRepositoryRepository interface for managing outbox records.
Provides methods for persisting, querying, and managing outbox records in the underlying data store.
- Since:
0.1.0
Roland Beisel
-
-
Method Summary
Modifier and Type Method Description abstract OutboxRecordsave(OutboxRecord record)Saves an outbox record to the repository. abstract List<OutboxRecord>findPendingRecords()Finds all pending outbox records that are ready for processing. abstract List<OutboxRecord>findCompletedRecords()Finds all completed outbox records. abstract List<OutboxRecord>findFailedRecords()Finds all failed outbox records. abstract List<String>findAggregateIdsWithPendingRecords(OutboxRecordStatus status)Finds aggregate IDs that have pending records with the specified status. abstract List<String>findAggregateIdsWithFailedRecords()Finds aggregate IDs that have failed records. abstract List<OutboxRecord>findAllIncompleteRecordsByAggregateId(String aggregateId)Finds all incomplete records for a specific aggregate ID. abstract UnitdeleteByStatus(OutboxRecordStatus status)Deletes all records with the specified status. abstract UnitdeleteByAggregateIdAndStatus(String aggregateId, OutboxRecordStatus status)Deletes records for a specific aggregate ID and status. -
-
Method Detail
-
save
abstract OutboxRecord save(OutboxRecord record)
Saves an outbox record to the repository.
- Parameters:
record- The outbox record to save- Returns:
The saved outbox record
-
findPendingRecords
abstract List<OutboxRecord> findPendingRecords()
Finds all pending outbox records that are ready for processing.
- Returns:
List of pending outbox records
-
findCompletedRecords
abstract List<OutboxRecord> findCompletedRecords()
Finds all completed outbox records.
- Returns:
List of completed outbox records
-
findFailedRecords
abstract List<OutboxRecord> findFailedRecords()
Finds all failed outbox records.
- Returns:
List of failed outbox records
-
findAggregateIdsWithPendingRecords
abstract List<String> findAggregateIdsWithPendingRecords(OutboxRecordStatus status)
Finds aggregate IDs that have pending records with the specified status.
- Parameters:
status- The status to filter by- Returns:
List of aggregate IDs with pending records
-
findAggregateIdsWithFailedRecords
abstract List<String> findAggregateIdsWithFailedRecords()
Finds aggregate IDs that have failed records.
- Returns:
List of aggregate IDs with failed records
-
findAllIncompleteRecordsByAggregateId
abstract List<OutboxRecord> findAllIncompleteRecordsByAggregateId(String aggregateId)
Finds all incomplete records for a specific aggregate ID.
- Parameters:
aggregateId- The aggregate ID to search for- Returns:
List of incomplete outbox records for the aggregate
-
deleteByStatus
abstract Unit deleteByStatus(OutboxRecordStatus status)
Deletes all records with the specified status.
- Parameters:
status- The status of records to delete
-
deleteByAggregateIdAndStatus
abstract Unit deleteByAggregateIdAndStatus(String aggregateId, OutboxRecordStatus status)
Deletes records for a specific aggregate ID and status.
- Parameters:
aggregateId- The aggregate IDstatus- The status of records to delete
-
-
-
-