Add database method to reset retransmission times

Will be used to ensure messages are not stranded on a Mailbox, when such
is added, removed, or otherwise changed.

Closes #2190.
This commit is contained in:
Daniel Lublin
2021-12-08 09:15:03 +01:00
parent 8d5803098b
commit 3eb3dbde09
5 changed files with 106 additions and 2 deletions

View File

@@ -471,6 +471,14 @@ public interface DatabaseComponent extends TransactionManager {
Map<MessageId, Integer> getUnackedMessagesToSend(Transaction txn,
ContactId c) throws DbException;
/**
* Reset the transmission count, expiry time and ETA of all messages that
* are eligible to be sent to the given contact. Messages are selected in
* the same way as {@link #getUnackedMessagesToSend(Transaction, ContactId)}
*/
void resetUnackedMessagesToSend(Transaction txn, ContactId c)
throws DbException;
/**
* Returns the total length, including headers, of all messages that are
* eligible to be sent to the given contact. This may include messages