Class OutboxRepository
java.lang.Object
one.tomorrow.transactionaloutbox.repository.OutboxRepository
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintdeleteOutboxRecordByProcessedNotNullAndProcessedIsBefore(Instant deleteOlderThan) Delete processed records older than defined point in timegetUnprocessedRecords(int limit) Return all records that have not yet been processed (i.e.voidpersist(OutboxRecord record) voidupdateProcessed(Long id, Instant processed)
-
Constructor Details
-
OutboxRepository
public OutboxRepository(org.springframework.jdbc.core.JdbcTemplate jdbcTemplate)
-
-
Method Details
-
persist
-
updateProcessed
-
getUnprocessedRecords
Return all records that have not yet been processed (i.e. that do not have the "processed" timestamp set).- Parameters:
limit- the max number of records to return- Returns:
- the requested records, sorted by id ascending
-
deleteOutboxRecordByProcessedNotNullAndProcessedIsBefore
Delete processed records older than defined point in time- Parameters:
deleteOlderThan- the point in time until the processed entities shall be kept- Returns:
- amount of deleted rows
-