Class SyncGeodatabaseParameters
- java.lang.Object
-
- com.esri.arcgisruntime.tasks.geodatabase.SyncGeodatabaseParameters
-
public final class SyncGeodatabaseParameters extends Object
Represents parameters that are used withGeodatabaseSyncTask.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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SyncGeodatabaseParameters.SyncDirection
Signifies the geodatabase synchronization direction.
-
Constructor Summary
Constructors Constructor Description SyncGeodatabaseParameters()
Constructs a new SyncGeodatabaseParameters instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<SyncLayerOption>
getLayerOptions()
Gets a mutable list of SyncLayerOption objects which specify how to synchronize features on a layer-by-layer basis.SyncGeodatabaseParameters.SyncDirection
getSyncDirection()
Gets the geodatabase synchronization direction.boolean
isKeepGeodatabaseDeltas()
Indicates whether or not the uploaded or downloaded server delta geodatabases will be removed at the end of the sync job.boolean
isRollbackOnFailure()
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 Detail
-
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 Detail
-
getLayerOptions
public List<SyncLayerOption> 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
public SyncGeodatabaseParameters.SyncDirection 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:
GenerateGeodatabaseParameters.getSyncModel()
-
setSyncDirection
public void setSyncDirection(SyncGeodatabaseParameters.SyncDirection syncDirection)
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:
GenerateGeodatabaseParameters.setSyncModel(SyncModel)
-
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:
isKeepGeodatabaseDeltas()
-
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:
setKeepGeodatabaseDeltas(boolean)
-
-