mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-13 11:19:04 +01:00
The polling interval increases exponentially each time polling is unsuccessful, up to a maximum of 60 minutes. The interval is reset to 2 minutes whenever a connection is made and whenever Bluetooth is re-enabled.
23 lines
352 B
Java
23 lines
352 B
Java
package org.briarproject.api.plugins;
|
|
|
|
/**
|
|
* Calculates polling intervals for transport plugins that use backoff.
|
|
*/
|
|
public interface Backoff {
|
|
|
|
/**
|
|
* Returns the current polling interval.
|
|
*/
|
|
int getPollingInterval();
|
|
|
|
/**
|
|
* Increments the backoff counter.
|
|
*/
|
|
void increment();
|
|
|
|
/**
|
|
* Resets the backoff counter.
|
|
*/
|
|
void reset();
|
|
}
|