public enum UploadStrategy extends java.lang.Enum<UploadStrategy>
Enum Constant and Description |
---|
CHUNKED_DATASET_STRATEGY
Upload the objects in junks of n objects using m diff uploads
|
INDIVIDUAL_OBJECTS_STRATEGY
Uploads the objects individually, one request per object
|
SINGLE_REQUEST_STRATEGY
Upload the objects in one request using 1 diff upload
|
Modifier and Type | Field and Description |
---|---|
static UploadStrategy |
DEFAULT_UPLOAD_STRATEGY
the default upload strategy
|
private java.lang.String |
preferenceValue |
Modifier and Type | Method and Description |
---|---|
static UploadStrategy |
fromPreference(java.lang.String preferenceValue) |
static UploadStrategy |
getFromPreferences()
Replies the upload strategy currently configured in the preferences.
|
java.lang.String |
getPreferenceValue()
Replies the value which is written to the preferences for a specific
upload strategy
|
static void |
saveToPreferences(UploadStrategy strategy)
Saves the upload strategy
strategy to the preferences. |
static UploadStrategy |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static UploadStrategy[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final UploadStrategy INDIVIDUAL_OBJECTS_STRATEGY
public static final UploadStrategy CHUNKED_DATASET_STRATEGY
public static final UploadStrategy SINGLE_REQUEST_STRATEGY
private java.lang.String preferenceValue
public static final UploadStrategy DEFAULT_UPLOAD_STRATEGY
public static UploadStrategy[] values()
for (UploadStrategy c : UploadStrategy.values()) System.out.println(c);
public static UploadStrategy valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic static UploadStrategy fromPreference(java.lang.String preferenceValue)
public java.lang.String getPreferenceValue()
public static UploadStrategy getFromPreferences()
osm-server.upload-strategy. If not present, checks for the legacy preference key
osm-server.atomic-upload. If both are missing or if the preference value is illegal,
DEFAULT_UPLOAD_STRATEGY
is replied.public static void saveToPreferences(UploadStrategy strategy)
strategy
to the preferences.strategy
- the strategy to save