mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-17 13:19:52 +01:00
Check periodically for retransmittable packets. Bug #46.
This commit is contained in:
@@ -13,14 +13,14 @@ class PollingRemovableDriveMonitor implements RemovableDriveMonitor, Runnable {
|
||||
|
||||
private final Executor ioExecutor;
|
||||
private final RemovableDriveFinder finder;
|
||||
private final long pollingInterval;
|
||||
private final int pollingInterval;
|
||||
private final Object pollingLock = new Object();
|
||||
|
||||
private volatile boolean running = false;
|
||||
private volatile Callback callback = null;
|
||||
|
||||
public PollingRemovableDriveMonitor(Executor ioExecutor,
|
||||
RemovableDriveFinder finder, long pollingInterval) {
|
||||
RemovableDriveFinder finder, int pollingInterval) {
|
||||
this.ioExecutor = ioExecutor;
|
||||
this.finder = finder;
|
||||
this.pollingInterval = pollingInterval;
|
||||
|
||||
@@ -29,7 +29,7 @@ implements RemovableDriveMonitor.Callback {
|
||||
|
||||
RemovableDrivePlugin(Executor ioExecutor, FileUtils fileUtils,
|
||||
SimplexPluginCallback callback, RemovableDriveFinder finder,
|
||||
RemovableDriveMonitor monitor, int maxFrameLength, long maxLatency) {
|
||||
RemovableDriveMonitor monitor, int maxFrameLength, int maxLatency) {
|
||||
super(ioExecutor, fileUtils, callback, maxFrameLength, maxLatency);
|
||||
this.finder = finder;
|
||||
this.monitor = monitor;
|
||||
@@ -54,7 +54,7 @@ implements RemovableDriveMonitor.Callback {
|
||||
return false;
|
||||
}
|
||||
|
||||
public long getPollingInterval() {
|
||||
public int getPollingInterval() {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
|
||||
@@ -14,8 +14,8 @@ import org.briarproject.util.OsUtils;
|
||||
public class RemovableDrivePluginFactory implements SimplexPluginFactory {
|
||||
|
||||
// Maximum latency 14 days (Royal Mail or lackadaisical carrier pigeon)
|
||||
private static final long MAX_LATENCY = 14 * 24 * 60 * 60 * 1000;
|
||||
private static final long POLLING_INTERVAL = 10 * 1000; // 10 seconds
|
||||
private static final int MAX_LATENCY = 14 * 24 * 60 * 60 * 1000;
|
||||
private static final int POLLING_INTERVAL = 10 * 1000; // 10 seconds
|
||||
|
||||
private final Executor ioExecutor;
|
||||
private final FileUtils fileUtils;
|
||||
|
||||
Reference in New Issue
Block a user