The resumable synchronization APIs enable an interrupted synchronization with partial
data downloaded to the device to resume from the point of interruption, without restarting
the entire download again.
Resumable
synchronization is particularly useful when you synchronize large data sets, and do not
want to have to cancel or roll back any partially downloaded data. You can resume the
synchronization that meets all of these conditions:
- It must be within the lifetime of the application. You cannot
resume the session after the application terminates, for example if the
application is closed.
- The resumable option must be set before calling
synchronization.
- The synchronization must be performed asynchronously in
background mode.
- There is partial data downloaded to the device when the
interruption occurs.
Synchronization can be interrruped by either environmental changes (for example, a
dropped connection) or when the application code disables or cancels the synchronization
(for example,
by
returning true in the SyncStatusListener ObjectSyncStatus method).
- Application code disables or cancels the synchronization for any reason – for example,
Note: You cannot resume synchronization if the MobiLink Server restarts, since all
pending downloads are lost.
If your callback handler is registered, and if some data has downloaded data before the
interruption, this status is returned in the
ICallbackHandler
OnSynchronize method at the time of the
interruption:
SynchronizationStatus.INTERRUPTED_WITH_PARTIAL_DATA
The
system locks the synchronization queue in a pending synchronization mode that waits for
the response to either resume or cancel.
The application determines when to resume the synchronization. The resume Synchronization
API first releases the locked synchronization queue, then sends a resume synchronization
request to the server. If the request is too early, the resumption may fail immediately
if the connection is not yet available. However, if the request is sent too late, the
download data may no longer be available on the server.
See the topic Configuring Resumable Synchronization in the
SAP Control Center for SAP Mobile Server
collection for information about setting a cache storage size for resumable
download data. The default cache size is 5 GB.