MapUpdater.MapUpdateVersionCommitPolicy (API Reference)
Enum Class MapUpdater.MapUpdateVersionCommitPolicy
- All Implemented Interfaces:
Serializable,Comparable<MapUpdater.MapUpdateVersionCommitPolicy>,Constable
- Enclosing class:
- MapUpdater
Defines if installed regions and subregions are updated one-by-one or if all regions are
updated only once the updates for all installed regions have been downloaded entirely.
This influences the required size of the storage during an update.
Regardless of the set policy, during an update, the previous region data is kept
until the new region data is committed successfully to the persisted storage.
This allows to revert to the previous version in case the update fails.
With ON_COMPLETE, more data has to be kept until
the update process finishes, while ON_FIRST_REGION
allows to make faster use of the downloaded region and requires less disk space as only the
currently updated region is kept until the process completes.
However, with an ON_FIRST_REGION policy the overall
process can be less reliable and bears a higher risk of errors.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionCommits the new map version to the cache and the persisted storage once all previously installed regions have been updated.Updates the cache and the persisted storage once the first region was fully downloaded. -
Method Summary
Modifier and TypeMethodDescriptionReturns the enum constant of this class with the specified name.values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
ON_FIRST_REGION
Updates the cache and the persisted storage once the first region was fully downloaded. If only one region was requested, this setting is equivalent to
ON_COMPLETE. If more regions or subregions are requested, then the policy will apply. For example, if Germany is requested to be updated, then the cache and the persisted storage will be updated as soon as any contained subregion such as Berlin or Brandenburg has been fully downloaded. The previous data for a region will be removed once that specific region has been updated successfully. However, theMapVersionHandlewill be updated once the first region has been installed. This inconsistency will be gone, once the update process completes. In case of errors, or an aborted update process,CatalogsUpdateInfoCallbackindicates that still an update is available until the process was successfully repeated. -
ON_COMPLETE
Commits the new map version to the cache and the persisted storage once all previously installed regions have been updated. For example, if Germany needs an update, then all previous data is kept until Germany including all subregions has been downloaded. This update process is more reliable than
ON_FIRST_REGION, but requires more free storage space until the process completes. Besides, users need to wait longer until they can use all updated regions.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-