Sync

object Sync

Functions

Link copied to clipboard
fun basicSyncJob(context: <ERROR CLASS>): SyncJob
Link copied to clipboard
inline fun <W : FhirSyncWorker> oneTimeSync(context: <ERROR CLASS>, retryConfiguration: RetryConfiguration? = defaultRetryConfiguration)

Starts a one time sync based on FhirSyncWorker. In case of a failure, RetryConfiguration will guide the retry mechanism. Caller can set retryConfiguration to null to stop retry.

suspend fun oneTimeSync(context: <ERROR CLASS>, fhirEngine: FhirEngine, downloadManager: DownloadWorkManager): Result

Does a one time sync based on ResourceSearchParams. Returns a Result that tells caller whether process was Success or Failure. In case of failure, caller needs to take care of the retry

Link copied to clipboard
inline fun <W : FhirSyncWorker> periodicSync(context: <ERROR CLASS>, periodicSyncConfiguration: PeriodicSyncConfiguration)

Starts a periodic sync based on FhirSyncWorker. It takes PeriodicSyncConfiguration to determine the sync frequency and RetryConfiguration to guide the retry mechanism. Caller can set retryConfiguration to null to stop retry.