Class SyncGeodatabaseParameters
GeodatabaseSyncTask.syncGeodatabase(SyncGeodatabaseParameters, Geodatabase)
to synchronize geodatabases.
Consider using the convenience method GeodatabaseSyncTask.createDefaultSyncGeodatabaseParametersAsync(Geodatabase)
to get a properly initialized instance of this class with appropriate default values which take into account the capabilities
supported by the ArcGIS feature service and the data it contains.
- Since:
- 100.0.0
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
Signifies the geodatabase synchronization direction. -
Constructor Summary
ConstructorDescriptionConstructs a new SyncGeodatabaseParameters instance. -
Method Summary
Modifier and TypeMethodDescriptionGets a mutable list of SyncLayerOption objects which specify how to synchronize features on a layer-by-layer basis.Gets the geodatabase synchronization direction.boolean
Indicates whether or not the uploaded or downloaded server delta geodatabases will be removed at the end of the sync job.boolean
Gets the value of the rollbackOnFailure flag.void
setKeepGeodatabaseDeltas
(boolean keepGeodatabaseDeltas) Sets whether or not the uploaded or downloaded server delta geodatabases will be removed at the end of the sync job.void
setRollbackOnFailure
(boolean rollbackOnFailure) Sets the value of the rollbackOnFailure flag.void
setSyncDirection
(SyncGeodatabaseParameters.SyncDirection syncDirection) Sets the geodatabase synchronization direction.
-
Constructor Details
-
SyncGeodatabaseParameters
public SyncGeodatabaseParameters()Constructs a new SyncGeodatabaseParameters instance. Use this constructor if you are setting all of its properties yourself. Consider using the convenience methodGeodatabaseSyncTask.createDefaultSyncGeodatabaseParametersAsync(Geodatabase)
rather than this constructor to get an initialized instance of this class with properties already set which take into account the capabilities supported by the ArcGIS feature service.- Since:
- 100.0.0
-
-
Method Details
-
getLayerOptions
Gets a mutable list of SyncLayerOption objects which specify how to synchronize features on a layer-by-layer basis. If not previously set, this method will return an empty list to which you can add SyncLayerOption objects.Note, these layer options are only applicable to geodatabases using the sync model of
SyncModel.PER_LAYER
.- Returns:
- the list of SyncLayerOption objects
- Since:
- 100.0.0
-
isRollbackOnFailure
public boolean isRollbackOnFailure()Gets the value of the rollbackOnFailure flag. This determines the behavior when there are failures while importing edits on the server during synchronization. It only applies in cases where clients are uploading edits to the server.- Returns:
- true if all edits are rolled back (not applied) if a failure occurs while importing edits on the server; false if failed edits are skipped and other edits still applied
- Since:
- 100.0.0
-
setRollbackOnFailure
public void setRollbackOnFailure(boolean rollbackOnFailure) Sets the value of the rollbackOnFailure flag. This determines the behavior when there are failures while importing edits on the server during synchronization. It only applies in cases where clients are uploading edits to the server. The default value is false.- Parameters:
rollbackOnFailure
- true if all edits are rolled back (not applied) if a failure occurs while importing edits on the server; false if failed edits are skipped and other edits still applied- Since:
- 100.0.0
-
getSyncDirection
Gets the geodatabase synchronization direction. This is used only if the Geodatabase has a sync model ofSyncModel.PER_GEODATABASE
, it is ignored forSyncModel.PER_LAYER
.- Returns:
- the geodatabase synchronization direction
- Since:
- 100.0.0
- See Also:
-
setSyncDirection
Sets the geodatabase synchronization direction. This is used only if the Geodatabase has a sync model ofSyncModel.PER_GEODATABASE
, it is ignored forSyncModel.PER_LAYER
. The default value isSyncGeodatabaseParameters.SyncDirection.BIDIRECTIONAL
.- Parameters:
syncDirection
- the geodatabase synchronization direction- Throws:
IllegalArgumentException
- if syncDirection is null- Since:
- 100.0.0
- See Also:
-
isKeepGeodatabaseDeltas
public boolean isKeepGeodatabaseDeltas()Indicates whether or not the uploaded or downloaded server delta geodatabases will be removed at the end of the sync job.A delta geodatabase is a file that contains the changes that have occurred since a mobile replica
Geodatabase
was last synchronized with its feature service. See Synchronize Replica for an overview of the delta files used in synchronization. There are two types of delta geodatabase:- Local edits, performed on the user's device, are exported as an "upload" delta that is applied to the originating feature service.
- Online edits, performed by other users, are requested as a "download" delta which is then applied to the local replica geodatabase.
You can choose to retain both the uploaded and downloaded delta geodatabases once the sync job has completed. Set to true to retain both delta geodatabases and set to false to have them deleted at the end of the sync job. Deltas will be retained regardless of whether the job succeeds or fails. Note that when this property is set to true, the upload delta geodatabase will only be available if there are changes to upload and the sync direction is
SyncGeodatabaseParameters.SyncDirection.UPLOAD
orSyncGeodatabaseParameters.SyncDirection.BIDIRECTIONAL
. The download delta geodatabase will only be available when there are changes to download and the sync direction isSyncGeodatabaseParameters.SyncDirection.DOWNLOAD
orSyncGeodatabaseParameters.SyncDirection.BIDIRECTIONAL
. The default value is false.- Returns:
- indicates whether or not the upload or downloaded server delta geodatabases will be removed at the end of the sync job
- Since:
- 100.10.0
- See Also:
-
setKeepGeodatabaseDeltas
public void setKeepGeodatabaseDeltas(boolean keepGeodatabaseDeltas) Sets whether or not the uploaded or downloaded server delta geodatabases will be removed at the end of the sync job.A delta geodatabase is a file that contains the changes that have occurred since a mobile replica
Geodatabase
was last synchronized with its feature service. See https://developers.arcgis.com/rest/services-reference/synchronize-replica.htm for an overview of the delta files used in synchronization. There are two types of delta geodatabase:- Local edits, performed on the user's device, are exported as an "upload" delta delta that is applied to the originating feature service.
- Online edits, performed by other users are requested as a "download" delta which is then applied to the local replica geodatabase.
You can choose to retain both the uploaded and downloaded delta geodatabases once the sync job has completed. Set to true to retain both delta geodatabases and set to false to have them deleted at the end of the sync job. Deltas will be retained regardless of whether the job succeeds or fails. Note that when this property is set to true, the upload delta geodatabase will only be available if there are changes to upload and the sync direction is
SyncGeodatabaseParameters.SyncDirection.UPLOAD
orSyncGeodatabaseParameters.SyncDirection.BIDIRECTIONAL
. The download delta geodatabase will only be available when there are changes to download and the sync direction isSyncGeodatabaseParameters.SyncDirection.DOWNLOAD
orSyncGeodatabaseParameters.SyncDirection.BIDIRECTIONAL
. The default value is false.- Parameters:
keepGeodatabaseDeltas
- indicates whether or not the upload or downloaded server delta geodatabases will be removed at the end of the sync job- Since:
- 100.10.0
- See Also:
-