Appearance
class SyncManager
#include <flake/SyncManager.h>
Public Functions
| Name | |
|---|---|
| SyncManager(unsigned monthlyBudget_, unsigned remainingBudget_, int baseSyncInterval_, double eventBudgetFraction =0.5) | |
| unsigned | getRemainingTotalBudget() const |
| unsigned | getTotalBudget() const |
| bool | canSyncRegular(unsigned expectedCost) const |
| void | recordSync(unsigned actualDataConsumed) |
| void | recordDataTransfer(unsigned actualDataConsumed) |
| void | resetMonthlyBudget() |
| int | getCurrentSyncInterval() const |
Public Functions Documentation
function SyncManager
cpp
SyncManager(
unsigned monthlyBudget_,
unsigned remainingBudget_,
int baseSyncInterval_,
double eventBudgetFraction =0.5
)function getRemainingTotalBudget
cpp
unsigned getRemainingTotalBudget() constfunction getTotalBudget
cpp
unsigned getTotalBudget() constfunction canSyncRegular
cpp
bool canSyncRegular(
unsigned expectedCost
) constfunction recordSync
cpp
void recordSync(
unsigned actualDataConsumed
)function recordDataTransfer
cpp
void recordDataTransfer(
unsigned actualDataConsumed
)function resetMonthlyBudget
cpp
void resetMonthlyBudget()function getCurrentSyncInterval
cpp
int getCurrentSyncInterval() const