public class RestoreSnapshotRequestBuilder extends MasterNodeOperationRequestBuilder<RestoreSnapshotRequest,RestoreSnapshotResponse,RestoreSnapshotRequestBuilder>
action, client, request
Constructor and Description |
---|
RestoreSnapshotRequestBuilder(ElasticsearchClient client,
RestoreSnapshotAction action)
Constructs new restore snapshot request builder
|
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
|
Modifier and Type | Method and Description |
---|---|
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
|
RestoreSnapshotRequestBuilder |
setIgnoreIndexSettings(java.lang.String... ignoreIndexSettings)
Sets the list of index settings and index settings groups that shouldn't be restored from snapshot
|
RestoreSnapshotRequestBuilder |
setIncludeAliases(boolean restoreAliases)
If set to true the restore procedure will restore aliases
|
RestoreSnapshotRequestBuilder |
setIndexSettings(java.util.Map<java.lang.String,java.lang.Object> source)
Sets index settings that should be added or replaced during restore
|
RestoreSnapshotRequestBuilder |
setIndexSettings(Settings.Builder settings)
Sets index settings that should be added or replaced during restore
|
RestoreSnapshotRequestBuilder |
setIndexSettings(Settings settings)
Sets index settings that should be added or replaced during restore
|
RestoreSnapshotRequestBuilder |
setIndexSettings(java.lang.String source)
Deprecated.
use
setIndexSettings(String, XContentType) to avoid content type detection |
RestoreSnapshotRequestBuilder |
setIndexSettings(java.lang.String source,
XContentType xContentType)
Sets index settings that should be added or replaced during restore
|
RestoreSnapshotRequestBuilder |
setIndices(java.lang.String... indices)
Sets the list of indices that should be restored from snapshot
|
RestoreSnapshotRequestBuilder |
setIndicesOptions(IndicesOptions indicesOptions)
Specifies what type of requested indices to ignore and how to deal with wildcard expressions.
|
RestoreSnapshotRequestBuilder |
setPartial(boolean partial)
If set to true the restore procedure will restore partially snapshotted indices
|
RestoreSnapshotRequestBuilder |
setRenamePattern(java.lang.String renamePattern)
Sets rename pattern that should be applied to restored indices.
|
RestoreSnapshotRequestBuilder |
setRenameReplacement(java.lang.String renameReplacement)
Sets rename replacement
|
RestoreSnapshotRequestBuilder |
setRepository(java.lang.String repository)
Sets repository name
|
RestoreSnapshotRequestBuilder |
setRestoreGlobalState(boolean restoreGlobalState)
If set to true the restore procedure will restore global cluster state.
|
RestoreSnapshotRequestBuilder |
setSettings(java.util.Map<java.lang.String,java.lang.Object> source)
Sets repository-specific restore settings
|
RestoreSnapshotRequestBuilder |
setSettings(Settings.Builder settings)
Sets repository-specific restore settings.
|
RestoreSnapshotRequestBuilder |
setSettings(Settings settings)
Sets repository-specific restore settings.
|
RestoreSnapshotRequestBuilder |
setSettings(java.lang.String source)
Deprecated.
use
setSettings(String, XContentType) to avoid content type detection |
RestoreSnapshotRequestBuilder |
setSettings(java.lang.String source,
XContentType xContentType)
Sets repository-specific restore settings in JSON or YAML format
|
RestoreSnapshotRequestBuilder |
setSnapshot(java.lang.String snapshot)
Sets snapshot name
|
RestoreSnapshotRequestBuilder |
setWaitForCompletion(boolean waitForCompletion)
If this parameter is set to true the operation will wait for completion of restore process before returning.
|
setMasterNodeTimeout, setMasterNodeTimeout
beforeExecute, execute, execute, get, get, get, request
public RestoreSnapshotRequestBuilder(ElasticsearchClient client, RestoreSnapshotAction action)
public RestoreSnapshotRequestBuilder(ElasticsearchClient client, RestoreSnapshotAction action, java.lang.String repository, java.lang.String name)
public RestoreSnapshotRequestBuilder setSnapshot(java.lang.String snapshot)
snapshot
- snapshot namepublic RestoreSnapshotRequestBuilder setRepository(java.lang.String repository)
repository
- repository namepublic RestoreSnapshotRequestBuilder setIndices(java.lang.String... indices)
The 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.
indices
- list of indicespublic RestoreSnapshotRequestBuilder setIndicesOptions(IndicesOptions indicesOptions)
indicesOptions
- the desired behaviour regarding indices to ignore and wildcard indices expressionspublic RestoreSnapshotRequestBuilder setRenamePattern(java.lang.String renamePattern)
Indices that match the rename pattern will be renamed according to setRenameReplacement(String)
. The
rename pattern is applied according to the Matcher.appendReplacement(StringBuffer, String)
The request will fail if two or more indices will be renamed into the same name.
renamePattern
- rename patternpublic RestoreSnapshotRequestBuilder setRenameReplacement(java.lang.String renameReplacement)
See setRenamePattern(String)
for more information.
renameReplacement
- rename replacementpublic RestoreSnapshotRequestBuilder setSettings(Settings settings)
See repository documentation for more information.
settings
- repository-specific snapshot settingspublic RestoreSnapshotRequestBuilder setSettings(Settings.Builder settings)
See repository documentation for more information.
settings
- repository-specific snapshot settings@Deprecated public RestoreSnapshotRequestBuilder setSettings(java.lang.String source)
setSettings(String, XContentType)
to avoid content type detectionSee repository documentation for more information.
source
- repository-specific snapshot settingspublic RestoreSnapshotRequestBuilder setSettings(java.lang.String source, XContentType xContentType)
See repository documentation for more information.
source
- repository-specific snapshot settingsxContentType
- the content type of the sourcepublic RestoreSnapshotRequestBuilder setSettings(java.util.Map<java.lang.String,java.lang.Object> source)
See repository documentation for more information.
source
- repository-specific snapshot settingspublic RestoreSnapshotRequestBuilder setWaitForCompletion(boolean waitForCompletion)
waitForCompletion
- if true the operation will wait for completionpublic RestoreSnapshotRequestBuilder setRestoreGlobalState(boolean restoreGlobalState)
The global cluster state includes persistent settings and index template definitions.
restoreGlobalState
- true if global state should be restored from the snapshotpublic RestoreSnapshotRequestBuilder setPartial(boolean partial)
partial
- true if partially snapshotted indices should be restoredpublic RestoreSnapshotRequestBuilder setIncludeAliases(boolean restoreAliases)
restoreAliases
- true if aliases should be restored from the snapshotpublic RestoreSnapshotRequestBuilder setIndexSettings(Settings settings)
settings
- index settingspublic RestoreSnapshotRequestBuilder setIndexSettings(Settings.Builder settings)
settings
- index settings@Deprecated public RestoreSnapshotRequestBuilder setIndexSettings(java.lang.String source)
setIndexSettings(String, XContentType)
to avoid content type detectionsource
- index settingspublic RestoreSnapshotRequestBuilder setIndexSettings(java.lang.String source, XContentType xContentType)
source
- index settingsxContentType
- the content type of the sourcepublic RestoreSnapshotRequestBuilder setIndexSettings(java.util.Map<java.lang.String,java.lang.Object> source)
source
- index settingspublic RestoreSnapshotRequestBuilder setIgnoreIndexSettings(java.lang.String... ignoreIndexSettings)
public RestoreSnapshotRequestBuilder setIgnoreIndexSettings(java.util.List<java.lang.String> ignoreIndexSettings)