public class RestoreSnapshotRequest extends MasterNodeRequest<RestoreSnapshotRequest>
TransportRequest.EmptyDEFAULT_MASTER_NODE_TIMEOUT, masterNodeTimeoutheaders| Constructor and Description |
|---|
RestoreSnapshotRequest() |
RestoreSnapshotRequest(String repository,
String snapshot)
Constructs a new put repository request with the provided repository and snapshot names.
|
| Modifier and Type | Method and Description |
|---|---|
String[] |
ignoreIndexSettings()
Returns the list of index settings and index settings groups that shouldn't be restored from snapshot
|
RestoreSnapshotRequest |
ignoreIndexSettings(List<String> ignoreIndexSettings)
Sets the list of index settings and index settings groups that shouldn't be restored from snapshot
|
RestoreSnapshotRequest |
ignoreIndexSettings(String... ignoreIndexSettings)
Sets the list of index settings and index settings groups that shouldn't be restored from snapshot
|
boolean |
includeAliases()
Returns true if aliases should be restored from this snapshot
|
RestoreSnapshotRequest |
includeAliases(boolean includeAliases)
If set to true the restore procedure will restore aliases
|
boolean |
includeGlobalState()
Returns true if global state should be restored from this snapshot
|
RestoreSnapshotRequest |
includeGlobalState(boolean includeGlobalState)
If set to true the restore procedure will restore global cluster state.
|
Settings |
indexSettings()
Returns settings that should be added/changed in all restored indices
|
RestoreSnapshotRequest |
indexSettings(Map<String,Object> source)
Sets settings that should be added/changed in all restored indices
|
RestoreSnapshotRequest |
indexSettings(Settings.Builder settings)
Sets settings that should be added/changed in all restored indices
|
RestoreSnapshotRequest |
indexSettings(Settings settings)
Sets settings that should be added/changed in all restored indices
|
RestoreSnapshotRequest |
indexSettings(String source)
Sets settings that should be added/changed in all restored indices
|
String[] |
indices()
Returns list of indices that should be restored from snapshot
|
RestoreSnapshotRequest |
indices(List<String> indices)
Sets the list of indices that should be restored from snapshot
|
RestoreSnapshotRequest |
indices(String... indices)
Sets the list of indices that should be restored from snapshot
|
IndicesOptions |
indicesOptions()
Specifies what type of requested indices to ignore and how to deal with wildcard expressions.
|
RestoreSnapshotRequest |
indicesOptions(IndicesOptions indicesOptions)
Specifies what type of requested indices to ignore and how to deal with wildcard expressions.
|
boolean |
partial()
Returns true if indices with failed to snapshot shards should be partially restored.
|
RestoreSnapshotRequest |
partial(boolean partial)
Set to true to allow indices with failed to snapshot shards should be partially restored.
|
void |
readFrom(StreamInput in) |
String |
renamePattern()
Returns rename pattern
|
RestoreSnapshotRequest |
renamePattern(String renamePattern)
Sets rename pattern that should be applied to restored indices.
|
String |
renameReplacement()
Returns rename replacement
|
RestoreSnapshotRequest |
renameReplacement(String renameReplacement)
Sets rename replacement
|
String |
repository()
Returns repository name
|
RestoreSnapshotRequest |
repository(String repository)
Sets repository name
|
Settings |
settings()
Returns repository-specific restore settings
|
RestoreSnapshotRequest |
settings(Map<String,Object> source)
Sets repository-specific restore settings
|
RestoreSnapshotRequest |
settings(Settings.Builder settings)
Sets repository-specific restore settings.
|
RestoreSnapshotRequest |
settings(Settings settings)
Sets repository-specific restore settings.
|
RestoreSnapshotRequest |
settings(String source)
Sets repository-specific restore settings in JSON, YAML or properties format
|
String |
snapshot()
Returns the name of the snapshot.
|
RestoreSnapshotRequest |
snapshot(String snapshot)
Sets the name of the snapshot.
|
RestoreSnapshotRequest |
source(byte[] source)
Parses restore definition
|
RestoreSnapshotRequest |
source(byte[] source,
int offset,
int length)
Parses restore definition
|
RestoreSnapshotRequest |
source(BytesReference source)
Parses restore definition
|
RestoreSnapshotRequest |
source(Map source)
Parses restore definition
|
RestoreSnapshotRequest |
source(String source)
Parses restore definition
|
RestoreSnapshotRequest |
source(XContentBuilder source)
Parses restore definition
|
ActionRequestValidationException |
validate() |
boolean |
waitForCompletion()
Returns wait for completion setting
|
RestoreSnapshotRequest |
waitForCompletion(boolean waitForCompletion)
If this parameter is set to true the operation will wait for completion of restore process before returning.
|
void |
writeTo(StreamOutput out) |
masterNodeTimeout, masterNodeTimeout, masterNodeTimeoutcreateTask, createTask, setParentTaskgetDescriptionremoteAddress, remoteAddresscontextSize, copyContextAndHeadersFrom, copyContextFrom, copyHeadersFrom, getContext, getFromContext, getFromContext, getHeader, getHeaders, hasHeader, hasInContext, isContextEmpty, putAllInContext, putHeader, putInContextpublic ActionRequestValidationException validate()
validate in class ActionRequest<RestoreSnapshotRequest>public RestoreSnapshotRequest snapshot(String snapshot)
snapshot - snapshot namepublic String snapshot()
public RestoreSnapshotRequest repository(String repository)
repository - repository namepublic String repository()
public RestoreSnapshotRequest indices(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 RestoreSnapshotRequest indices(List<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 String[] indices()
public IndicesOptions indicesOptions()
public RestoreSnapshotRequest indicesOptions(IndicesOptions indicesOptions)
indicesOptions - the desired behaviour regarding indices to ignore and wildcard indices expressionspublic RestoreSnapshotRequest renamePattern(String renamePattern)
Indices that match the rename pattern will be renamed according to renameReplacement(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 String renamePattern()
public RestoreSnapshotRequest renameReplacement(String renameReplacement)
See renamePattern(String) for more information.
renameReplacement - rename replacementpublic String renameReplacement()
public RestoreSnapshotRequest waitForCompletion(boolean waitForCompletion)
waitForCompletion - if true the operation will wait for completionpublic boolean waitForCompletion()
public boolean partial()
public RestoreSnapshotRequest partial(boolean partial)
partial - true if indices with failed to snapshot shards should be partially restored.public RestoreSnapshotRequest settings(Settings settings)
See repository documentation for more information.
settings - repository-specific snapshot settingspublic RestoreSnapshotRequest settings(Settings.Builder settings)
See repository documentation for more information.
settings - repository-specific snapshot settingspublic RestoreSnapshotRequest settings(String source)
See repository documentation for more information.
source - repository-specific snapshot settingspublic RestoreSnapshotRequest settings(Map<String,Object> source)
See repository documentation for more information.
source - repository-specific snapshot settingspublic Settings settings()
public RestoreSnapshotRequest ignoreIndexSettings(String... ignoreIndexSettings)
public RestoreSnapshotRequest ignoreIndexSettings(List<String> ignoreIndexSettings)
public String[] ignoreIndexSettings()
public RestoreSnapshotRequest includeGlobalState(boolean includeGlobalState)
The global cluster state includes persistent settings and index template definitions.
includeGlobalState - true if global state should be restored from the snapshotpublic boolean includeGlobalState()
public RestoreSnapshotRequest includeAliases(boolean includeAliases)
includeAliases - true if aliases should be restored from the snapshotpublic boolean includeAliases()
public RestoreSnapshotRequest indexSettings(Settings settings)
public RestoreSnapshotRequest indexSettings(Settings.Builder settings)
public RestoreSnapshotRequest indexSettings(String source)
public RestoreSnapshotRequest indexSettings(Map<String,Object> source)
public Settings indexSettings()
public RestoreSnapshotRequest source(XContentBuilder source)
source - restore definitionpublic RestoreSnapshotRequest source(Map source)
source - restore definitionpublic RestoreSnapshotRequest source(String source)
JSON, YAML and properties formats are supported
source - restore definitionpublic RestoreSnapshotRequest source(byte[] source)
JSON, YAML and properties formats are supported
source - restore definitionpublic RestoreSnapshotRequest source(byte[] source, int offset, int length)
JSON, YAML and properties formats are supported
source - restore definitionoffset - offsetlength - lengthpublic RestoreSnapshotRequest source(BytesReference source)
JSON, YAML and properties formats are supported
source - restore definitionpublic void readFrom(StreamInput in) throws IOException
readFrom in interface StreamablereadFrom in class MasterNodeRequest<RestoreSnapshotRequest>IOExceptionpublic void writeTo(StreamOutput out) throws IOException
writeTo in interface StreamablewriteTo in class MasterNodeRequest<RestoreSnapshotRequest>IOExceptionCopyright © 2009–2017. All rights reserved.