syncStatus

fun syncStatus(network: NetworkStatus = NetworkStatus.UNKNOWN, pendingMutationCount: Int = 0, rejectedMutationCount: Int = 0, isSyncing: Boolean = false, lastSyncedAt: Instant? = null, lastSyncError: SyncFailedException? = null): SyncStatus(source)

Where the library stands with the queue and the network, as Offline.syncStatus holds it; every field defaults to the state of a client that has done nothing yet and has counted its queue: nothing waiting, SyncStatus.isQueueCounted true. For the value a client starts with, before its first count, give isQueueCounted = false, which selects the third overload.

Parameters

network

whether the library believes it can reach the network.

pendingMutationCount

the current user's queued writes.

rejectedMutationCount

the current user's rejected writes.

isSyncing

whether a sync pass is running.

lastSyncedAt

when the queue was last emptied by sending, or null.

lastSyncError

why the last pass stopped with writes still queued, or null.


fun syncStatus(network: NetworkStatus = NetworkStatus.UNKNOWN, pendingMutationCount: Int = 0, rejectedMutationCount: Int = 0, isSyncing: Boolean = false, lastSyncedAt: Instant? = null, lastSyncError: SyncFailedException? = null, conflictedMutationCount: Int): SyncStatus(source)

Where the library stands with the queue and the network, the conflicted list included; every field but conflictedMutationCount, which selects this overload, defaults to the state of a client that has done nothing yet and has counted its queue.

Parameters

network

whether the library believes it can reach the network.

pendingMutationCount

the current user's queued writes.

rejectedMutationCount

the current user's rejected writes.

isSyncing

whether a sync pass is running.

lastSyncedAt

when the queue was last emptied by sending, or null.

lastSyncError

why the last pass stopped with writes still queued, or null.

conflictedMutationCount

the current user's writes on the conflicted list.


fun syncStatus(network: NetworkStatus = NetworkStatus.UNKNOWN, pendingMutationCount: Int = 0, rejectedMutationCount: Int = 0, isSyncing: Boolean = false, lastSyncedAt: Instant? = null, lastSyncError: SyncFailedException? = null, conflictedMutationCount: Int = 0, isQueueCounted: Boolean): SyncStatus(source)

Where the library stands with the queue and the network, saying whether the queue has been counted; every field but isQueueCounted, which selects this overload, defaults to the state of a client that has done nothing yet. syncStatus(isQueueCounted = false) is the value a client starts with, before its first count.

Parameters

network

whether the library believes it can reach the network.

pendingMutationCount

the current user's queued writes.

rejectedMutationCount

the current user's rejected writes.

isSyncing

whether a sync pass is running.

lastSyncedAt

when the queue was last emptied by sending, or null.

lastSyncError

why the last pass stopped with writes still queued, or null.

conflictedMutationCount

the current user's writes on the conflicted list.

isQueueCounted

whether the counts have been read from the queue.