Class RestoreSnapshotRequestBuilder
public class RestoreSnapshotRequestBuilder extends MasterNodeOperationRequestBuilder<RestoreSnapshotRequest,RestoreSnapshotResponse,RestoreSnapshotRequestBuilder>
-
Field Summary
-
Constructor Summary
Constructors Constructor Description RestoreSnapshotRequestBuilder(ElasticsearchClient client, RestoreSnapshotAction action)Constructs new restore snapshot request builderRestoreSnapshotRequestBuilder(ElasticsearchClient client, RestoreSnapshotAction action, java.lang.String repository, java.lang.String name)Constructs new restore snapshot request builder with specified repository and snapshot names -
Method Summary
Modifier and Type Method Description RestoreSnapshotRequestBuildersetIgnoreIndexSettings(java.lang.String... ignoreIndexSettings)Sets the list of index settings and index settings groups that shouldn't be restored from snapshotRestoreSnapshotRequestBuildersetIgnoreIndexSettings(java.util.List<java.lang.String> ignoreIndexSettings)Sets the list of index settings and index settings groups that shouldn't be restored from snapshotRestoreSnapshotRequestBuildersetIncludeAliases(boolean restoreAliases)If set to true the restore procedure will restore aliasesRestoreSnapshotRequestBuildersetIndexSettings(java.lang.String source, XContentType xContentType)Sets index settings that should be added or replaced during restoreRestoreSnapshotRequestBuildersetIndexSettings(java.util.Map<java.lang.String,java.lang.Object> source)Sets index settings that should be added or replaced during restoreRestoreSnapshotRequestBuildersetIndexSettings(Settings settings)Sets index settings that should be added or replaced during restoreRestoreSnapshotRequestBuildersetIndexSettings(Settings.Builder settings)Sets index settings that should be added or replaced during restoreRestoreSnapshotRequestBuildersetIndices(java.lang.String... indices)Sets the list of indices that should be restored from snapshotRestoreSnapshotRequestBuildersetIndicesOptions(IndicesOptions indicesOptions)Specifies what type of requested indices to ignore and how to deal with wildcard expressions.RestoreSnapshotRequestBuildersetPartial(boolean partial)If set to true the restore procedure will restore partially snapshotted indicesRestoreSnapshotRequestBuildersetRenamePattern(java.lang.String renamePattern)Sets rename pattern that should be applied to restored indices.RestoreSnapshotRequestBuildersetRenameReplacement(java.lang.String renameReplacement)Sets rename replacementRestoreSnapshotRequestBuildersetRepository(java.lang.String repository)Sets repository nameRestoreSnapshotRequestBuildersetRestoreGlobalState(boolean restoreGlobalState)If set to true the restore procedure will restore global cluster state.RestoreSnapshotRequestBuildersetSettings(java.lang.String source, XContentType xContentType)Sets repository-specific restore settings in JSON or YAML formatRestoreSnapshotRequestBuildersetSettings(java.util.Map<java.lang.String,java.lang.Object> source)Sets repository-specific restore settingsRestoreSnapshotRequestBuildersetSettings(Settings settings)Sets repository-specific restore settings.RestoreSnapshotRequestBuildersetSettings(Settings.Builder settings)Sets repository-specific restore settings.RestoreSnapshotRequestBuildersetSnapshot(java.lang.String snapshot)Sets snapshot nameRestoreSnapshotRequestBuildersetWaitForCompletion(boolean waitForCompletion)If this parameter is set to true the operation will wait for completion of restore process before returning.Methods inherited from class org.elasticsearch.action.support.master.MasterNodeOperationRequestBuilder
setMasterNodeTimeout, setMasterNodeTimeout
-
Constructor Details
-
RestoreSnapshotRequestBuilder
Constructs new restore snapshot request builder -
RestoreSnapshotRequestBuilder
public RestoreSnapshotRequestBuilder(ElasticsearchClient client, RestoreSnapshotAction action, java.lang.String repository, java.lang.String name)Constructs new restore snapshot request builder with specified repository and snapshot names
-
-
Method Details
-
setSnapshot
Sets snapshot name- Parameters:
snapshot- snapshot name- Returns:
- this builder
-
setRepository
Sets repository name- Parameters:
repository- repository name- Returns:
- this builder
-
setIndices
Sets the list of indices that should be restored from snapshotThe list of indices supports multi-index syntax. For example: "+test*" ,"-test42" will index all indices with prefix "test" except index "test42". Aliases are not supported. An empty list or {"_all"} will restore all open indices in the snapshot.
- Parameters:
indices- list of indices- Returns:
- this builder
-
setIndicesOptions
Specifies what type of requested indices to ignore and how to deal with wildcard expressions. For example indices that don't exist.- Parameters:
indicesOptions- the desired behaviour regarding indices to ignore and wildcard indices expressions- Returns:
- this builder
-
setRenamePattern
Sets rename pattern that should be applied to restored indices.Indices that match the rename pattern will be renamed according to
setRenameReplacement(String). The rename pattern is applied according to theMatcher.appendReplacement(StringBuffer, String)The request will fail if two or more indices will be renamed into the same name.- Parameters:
renamePattern- rename pattern- Returns:
- this builder
-
setRenameReplacement
Sets rename replacementSee
setRenamePattern(String)for more information.- Parameters:
renameReplacement- rename replacement- Returns:
- this builder
-
setSettings
Sets repository-specific restore settings.See repository documentation for more information.
- Parameters:
settings- repository-specific snapshot settings- Returns:
- this builder
-
setSettings
Sets repository-specific restore settings.See repository documentation for more information.
- Parameters:
settings- repository-specific snapshot settings- Returns:
- this builder
-
setSettings
public RestoreSnapshotRequestBuilder setSettings(java.lang.String source, XContentType xContentType)Sets repository-specific restore settings in JSON or YAML formatSee repository documentation for more information.
- Parameters:
source- repository-specific snapshot settingsxContentType- the content type of the source- Returns:
- this builder
-
setSettings
public RestoreSnapshotRequestBuilder setSettings(java.util.Map<java.lang.String,java.lang.Object> source)Sets repository-specific restore settingsSee repository documentation for more information.
- Parameters:
source- repository-specific snapshot settings- Returns:
- this builder
-
setWaitForCompletion
If this parameter is set to true the operation will wait for completion of restore process before returning.- Parameters:
waitForCompletion- if true the operation will wait for completion- Returns:
- this builder
-
setRestoreGlobalState
If set to true the restore procedure will restore global cluster state.The global cluster state includes persistent settings and index template definitions.
- Parameters:
restoreGlobalState- true if global state should be restored from the snapshot- Returns:
- this builder
-
setPartial
If set to true the restore procedure will restore partially snapshotted indices- Parameters:
partial- true if partially snapshotted indices should be restored- Returns:
- this builder
-
setIncludeAliases
If set to true the restore procedure will restore aliases- Parameters:
restoreAliases- true if aliases should be restored from the snapshot- Returns:
- this builder
-
setIndexSettings
Sets index settings that should be added or replaced during restore- Parameters:
settings- index settings- Returns:
- this builder
-
setIndexSettings
Sets index settings that should be added or replaced during restore- Parameters:
settings- index settings- Returns:
- this builder
-
setIndexSettings
public RestoreSnapshotRequestBuilder setIndexSettings(java.lang.String source, XContentType xContentType)Sets index settings that should be added or replaced during restore- Parameters:
source- index settingsxContentType- the content type of the source- Returns:
- this builder
-
setIndexSettings
public RestoreSnapshotRequestBuilder setIndexSettings(java.util.Map<java.lang.String,java.lang.Object> source)Sets index settings that should be added or replaced during restore- Parameters:
source- index settings- Returns:
- this builder
-
setIgnoreIndexSettings
public RestoreSnapshotRequestBuilder setIgnoreIndexSettings(java.lang.String... ignoreIndexSettings)Sets the list of index settings and index settings groups that shouldn't be restored from snapshot -
setIgnoreIndexSettings
public RestoreSnapshotRequestBuilder setIgnoreIndexSettings(java.util.List<java.lang.String> ignoreIndexSettings)Sets the list of index settings and index settings groups that shouldn't be restored from snapshot
-