mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-13 19:29:06 +01:00
Factored out the database cleaner.
This commit is contained in:
@@ -21,9 +21,16 @@ public interface DatabaseComponent {
|
||||
static final long MAX_BYTES_BETWEEN_SPACE_CHECKS = 5L * MEGABYTES;
|
||||
static final long MAX_MS_BETWEEN_SPACE_CHECKS = 60L * 1000L; // 1 min
|
||||
static final long BYTES_PER_SWEEP = 5L * MEGABYTES;
|
||||
static final int CLEANER_SLEEP_MS = 1000; // 1 sec
|
||||
static final int MS_BETWEEN_SWEEPS = 1000; // 1 sec
|
||||
static final int RETRANSMIT_THRESHOLD = 3;
|
||||
|
||||
/**
|
||||
* Opens the database.
|
||||
* @param resume True to reopen an existing database or false to create a
|
||||
* new one.
|
||||
*/
|
||||
void open(boolean resume) throws DbException;
|
||||
|
||||
/** Waits for any open transactions to finish and closes the database. */
|
||||
void close() throws DbException;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user