SyncModel
The sync
parameter defines how layers can be synced. When creating a replica, clients can choose one of the following sync models by setting the sync
parameter:
per
—Layers within a replica cannot be synchronized independently. EachReplica synchronize
operation applies to all the layers in the replica.Replica per
—Layers within a replica can be synchronized independently. A chosen subset of the layers within a replica can be synchronized when running theLayer synchronize
operation.Replica
The feature service’s sync
property describes the supported sync models.
"syncCapabilities": {
"supportsPerLayerSync": true,
"supportsPerReplicaSync": true,
}
For example, if supports
is true
and supports
is false
, you can choose only a per
sync model when running the Create Replica operation. If supports
is not provided, it's false
by default. If supports
is not provided, it's true
by default.
RollbackOnFailure
When synchronizing, clients can set the rollback
parameter. Rollback
determines the behavior when there are errors while importing edits on the server during synchronization. This only applies in cases where clients are uploading edits to the server.
Rollback
can be set as follows:
true
—If an error occurs while importing edits on the server, all edits are rolled back (not applied), and the operation returns an error in the response. Use this setting when the edits are such that you either want all or none applied.false
—If an error occurs while importing an edit on the server, the import process skips the edit and continues. All edits that were skipped are returned in the results with information describing why they were skipped.
The feature service’s sync
property determines if the synchronizeReplica operation's rollback
parameter is supported.
"syncCapabilities": {
"supportsRollbackOnFailure": <true | false>
}
If the supports
property is true
, you can set the rollback
parameter to true
or false
when running the synchronizeReplica operation. If the supports
property is false
, the synchronizeReplica operation does not support the parameter.
When supports
is false
and only a per
sync model is supported (supports
set as true
and supports
set as false
), synchronizeReplica always applies the false
rollback
behavior above.
When supports
is false
and only a per
sync model is supported (supports
set as false
and supports
set as true
), synchronizeReplica always applies the true
rollback
behavior above.
For information on how to handle errors during sync, see Error handling with sync operations.
Supported rollbackOnFailure behavior and sync models
The following table lists the supported sync
and rollback
behavior with ArcGIS Server:
Data source | rollbackOnFailure | PerLayer syncModel | PerReplica syncModel |
---|---|---|---|
Nonversioned data | False | Yes | No |
Versioned data | True | No | Yes |