SyncService constructor
SyncService(
- ISyncConnectivityService _connectivityService,
- ILoggerProvider _syncLogger,
- ISyncErrorManager _errorManager,
- ISyncErrorReporter _errorReporter,
Gerencia todo o ciclo de vida da sincronização de dados, incluindo operações automáticas em background, tratamento de falhas, modo offline e recuperação de erros.
Implementation
SyncService(
this._connectivityService,
this._syncLogger,
this._errorManager,
this._errorReporter,
) {
_downloadStrategy = SyncDownloadStrategy();
_uploadStrategy = SyncUploadStrategy(
_syncLogger,
_errorManager,
);
SyncUtils.debugLog(
'SyncService inicializado - syncInterval: ${SyncConstants.syncInterval.inSeconds}s, initialDelay: ${SyncConstants.initialSyncDelay.inSeconds}s, recoveryTimeout: ${SyncConstants.recoveryTimeout.inSeconds}s',
tag: 'SyncService');
_initConnectivityListener();
_checkInitialConnectivity();
}