Add DB method for getting amount of data to sync.

This commit is contained in:
akwizgran
2021-05-05 17:52:37 +01:00
committed by Torsten Grote
parent f7fdf7745e
commit c5d6ee6782
6 changed files with 98 additions and 8 deletions

View File

@@ -292,6 +292,16 @@ public interface DatabaseComponent extends TransactionManager {
*/
Message getMessage(Transaction txn, MessageId m) throws DbException;
/**
* Returns the total length, including headers, of any messages that are
* eligible to be sent to the given contact via a transport with the given
* max latency.
* <p/>
* Read-only.
*/
long getMessageBytesToSend(Transaction txn, ContactId c, int maxLatency)
throws DbException;
/**
* Returns the IDs of all delivered messages in the given group.
* <p/>