SyncManager

Sync Manager

Types

Link copied to clipboard

Callback to get clean resync ghosts completion status

Link copied to clipboard

Sealed class representing the failure modes for suspendCleanResyncGhosts

Link copied to clipboard
object Companion
Link copied to clipboard
open class MobileSyncException @JvmOverloads constructor(val message: String? = null, val cause: Throwable? = null) : RuntimeException

Exception thrown by mobile sync manager

Link copied to clipboard

Sealed class representing the failure modes for suspendResync

Link copied to clipboard

Enum for sync manager state

Link copied to clipboard

Exception thrown when sync manager is stopped

Link copied to clipboard

Callback to get sync status udpates

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard

Add to active syncs map

Link copied to clipboard

Check if syncs are allowed to run Throw a SyncManagerStoppedException if sync manager is stopping/stopped

Link copied to clipboard

Removes local copies of records that have been deleted on the server or do not match the query results on the server anymore.

Link copied to clipboard
fun createSyncDown(target: SyncDownTarget, options: SyncOptions, soupName: String, syncName: String?): SyncState

Create a sync down

Link copied to clipboard
fun createSyncUp(target: SyncUpTarget, options: SyncOptions, soupName: String, syncName: String?): SyncState

Create a sync up

Link copied to clipboard
fun deleteSync(syncId: Long)

Delete sync by id

fun deleteSync(name: String?)

Delete sync by name

Link copied to clipboard

Get details of a sync by id

Get details of a sync by name

Link copied to clipboard

Return true if there is a sync with the given name

Link copied to clipboard

Remove from active syncs map

Link copied to clipboard
fun restart(restartStoppedSyncs: Boolean, callback: SyncManager.SyncUpdateCallback?)

Resume this sync manager Restart all stopped syncs if restartStoppedSyncs is true

Link copied to clipboard

Re-run sync but only fetch new/modified records

Link copied to clipboard

Run a sync

Link copied to clipboard

Send request after adding user-agent header that says MobileSync.

Link copied to clipboard

Stop the sync manager It might take a while for active syncs to actually get stopped Call isStopped() to see if syncManager is fully paused

Link copied to clipboard
suspend fun suspendCleanResyncGhosts(syncId: Long): Int

Co-routine wrapper for cleanResyncGhosts(syncId)

suspend fun suspendCleanResyncGhosts(syncName: String): Int

Co-routine wrapper for cleanResyncGhosts(syncName)

Link copied to clipboard
suspend fun suspendReSync(syncId: Long): SyncState

Co-routine wrapper for reSync(syncId)

suspend fun suspendReSync(syncName: String): SyncState

Co-routine wrapper for reSync(syncName)

Link copied to clipboard

Create and run a sync down that will overwrite any modified records

fun syncDown(target: SyncDownTarget, options: SyncOptions, soupName: String, callback: SyncManager.SyncUpdateCallback?): SyncState

Create and run a sync down without a name

fun syncDown(target: SyncDownTarget, options: SyncOptions, soupName: String, syncName: String?, callback: SyncManager.SyncUpdateCallback?): SyncState

Create and run a sync down

Link copied to clipboard
fun syncUp(target: SyncUpTarget, options: SyncOptions, soupName: String, callback: SyncManager.SyncUpdateCallback?): SyncState

Create and run a sync up without a name

fun syncUp(target: SyncUpTarget, options: SyncOptions, soupName: String, syncName: String?, callback: SyncManager.SyncUpdateCallback?): SyncState

Create and run a sync up