public class CreateSnapshotRequestBuilder extends MasterNodeOperationRequestBuilder<CreateSnapshotRequest,CreateSnapshotResponse,CreateSnapshotRequestBuilder>
action, client, request
Constructor | Description |
---|---|
CreateSnapshotRequestBuilder(ElasticsearchClient client,
CreateSnapshotAction action) |
Constructs a new create snapshot request builder
|
CreateSnapshotRequestBuilder(ElasticsearchClient client,
CreateSnapshotAction action,
java.lang.String repository,
java.lang.String snapshot) |
Constructs a new create snapshot request builder with specified repository and snapshot names
|
Modifier and Type | Method | Description |
---|---|---|
CreateSnapshotRequestBuilder |
setIncludeGlobalState(boolean includeGlobalState) |
Set to true if snapshot should include global cluster state
|
CreateSnapshotRequestBuilder |
setIndices(java.lang.String... indices) |
Sets a list of indices that should be included into the snapshot
|
CreateSnapshotRequestBuilder |
setIndicesOptions(IndicesOptions indicesOptions) |
Specifies the indices options.
|
CreateSnapshotRequestBuilder |
setPartial(boolean partial) |
If set to true the request should snapshot indices with unavailable shards
|
CreateSnapshotRequestBuilder |
setRepository(java.lang.String repository) |
Sets the repository name
|
CreateSnapshotRequestBuilder |
setSettings(java.lang.String source,
XContentType xContentType) |
Sets repository-specific snapshot settings in YAML or JSON format
|
CreateSnapshotRequestBuilder |
setSettings(java.util.Map<java.lang.String,java.lang.Object> settings) |
Sets repository-specific snapshot settings.
|
CreateSnapshotRequestBuilder |
setSettings(Settings settings) |
Sets repository-specific snapshot settings.
|
CreateSnapshotRequestBuilder |
setSettings(Settings.Builder settings) |
Sets repository-specific snapshot settings.
|
CreateSnapshotRequestBuilder |
setSnapshot(java.lang.String snapshot) |
Sets the snapshot name
|
CreateSnapshotRequestBuilder |
setWaitForCompletion(boolean waitForCompletion) |
If set to true the request should wait for the snapshot completion before returning.
|
execute, execute, get, get, get, request
setMasterNodeTimeout, setMasterNodeTimeout
public CreateSnapshotRequestBuilder(ElasticsearchClient client, CreateSnapshotAction action)
public CreateSnapshotRequestBuilder(ElasticsearchClient client, CreateSnapshotAction action, java.lang.String repository, java.lang.String snapshot)
public CreateSnapshotRequestBuilder setSnapshot(java.lang.String snapshot)
snapshot
- snapshot namepublic CreateSnapshotRequestBuilder setRepository(java.lang.String repository)
repository
- repository namepublic CreateSnapshotRequestBuilder 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 supported. An empty list or {"_all"} will snapshot all open indices in the cluster.
public CreateSnapshotRequestBuilder setIndicesOptions(IndicesOptions indicesOptions)
indicesOptions
- the desired behaviour regarding indices optionspublic CreateSnapshotRequestBuilder setWaitForCompletion(boolean waitForCompletion)
waitForCompletion
- true ifpublic CreateSnapshotRequestBuilder setPartial(boolean partial)
partial
- true if request should snapshot indices with unavailable shardspublic CreateSnapshotRequestBuilder setSettings(Settings settings)
See repository documentation for more information.
settings
- repository-specific snapshot settingspublic CreateSnapshotRequestBuilder setSettings(Settings.Builder settings)
See repository documentation for more information.
settings
- repository-specific snapshot settingspublic CreateSnapshotRequestBuilder setSettings(java.lang.String source, XContentType xContentType)
See repository documentation for more information.
source
- repository-specific snapshot settingsxContentType
- the content type of the sourcepublic CreateSnapshotRequestBuilder setSettings(java.util.Map<java.lang.String,java.lang.Object> settings)
See repository documentation for more information.
settings
- repository-specific snapshot settingspublic CreateSnapshotRequestBuilder setIncludeGlobalState(boolean includeGlobalState)
includeGlobalState
- true if snapshot should include global cluster state