SyncingService
open class SyncingService(remoteStorage: RemoteStorage, localStorage: LocalStorage, attachmentsService: AttachmentService, getLocalUri: suspend (String) -> String, errorHandler: SyncErrorHandler?, logger: Logger, scope: CoroutineScope, syncThrottle: Duration = 5.seconds)
Service responsible for syncing attachments between local and remote storage.
This service handles downloading, uploading, and deleting attachments, as well as periodically syncing attachment states. It ensures proper lifecycle management of sync operations and provides mechanisms for error handling and retries.
The class provides a default implementation for syncing operations, which can be overridden by subclasses to customize behavior as needed.
Constructors
Link copied to clipboard
constructor(remoteStorage: RemoteStorage, localStorage: LocalStorage, attachmentsService: AttachmentService, getLocalUri: suspend (String) -> String, errorHandler: SyncErrorHandler?, logger: Logger, scope: CoroutineScope, syncThrottle: Duration = 5.seconds)