public class CreateSnapshotRequestBuilder extends MasterNodeOperationRequestBuilder<CreateSnapshotRequest,CreateSnapshotResponse,CreateSnapshotRequestBuilder,ClusterAdminClient>
client, request
Constructor and Description |
---|
CreateSnapshotRequestBuilder(ClusterAdminClient clusterAdminClient)
Constructs a new create snapshot request builder
|
CreateSnapshotRequestBuilder(ClusterAdminClient clusterAdminClient,
String repository,
String snapshot)
Constructs a new create snapshot request builder with specified repository and snapshot names
|
Modifier and Type | Method and Description |
---|---|
protected void |
doExecute(ActionListener<CreateSnapshotResponse> listener) |
CreateSnapshotRequestBuilder |
setIncludeGlobalState(boolean includeGlobalState)
Set to true if snapshot should include global cluster state
|
CreateSnapshotRequestBuilder |
setIndices(String... indices)
Sets a list of indices that should be included into the snapshot
The list of indices supports multi-index syntax.
|
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(String repository)
Sets the repository name
|
CreateSnapshotRequestBuilder |
setSettings(Map<String,Object> settings)
Sets repository-specific snapshot settings.
|
CreateSnapshotRequestBuilder |
setSettings(Settings.Builder settings)
Sets repository-specific snapshot settings.
|
CreateSnapshotRequestBuilder |
setSettings(Settings settings)
Sets repository-specific snapshot settings.
|
CreateSnapshotRequestBuilder |
setSettings(String source)
Sets repository-specific snapshot settings in YAML, JSON or properties format
See repository documentation for more information.
|
CreateSnapshotRequestBuilder |
setSnapshot(String snapshot)
Sets the snapshot name
|
CreateSnapshotRequestBuilder |
setWaitForCompletion(boolean waitForCompletion)
If set to true the request should wait for the snapshot completion before returning.
|
setMasterNodeTimeout, setMasterNodeTimeout
execute, execute, get, get, get, putHeader, request, setListenerThreaded
public CreateSnapshotRequestBuilder(ClusterAdminClient clusterAdminClient)
clusterAdminClient
- cluster admin clientpublic CreateSnapshotRequestBuilder(ClusterAdminClient clusterAdminClient, String repository, String snapshot)
clusterAdminClient
- cluster admin clientrepository
- repository namesnapshot
- snapshot namepublic CreateSnapshotRequestBuilder setSnapshot(String snapshot)
snapshot
- snapshot namepublic CreateSnapshotRequestBuilder setRepository(String repository)
repository
- repository namepublic CreateSnapshotRequestBuilder setIndices(String... indices)
indices
- 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)
settings
- repository-specific snapshot settingspublic CreateSnapshotRequestBuilder setSettings(Settings.Builder settings)
settings
- repository-specific snapshot settingspublic CreateSnapshotRequestBuilder setSettings(String source)
source
- repository-specific snapshot settingspublic CreateSnapshotRequestBuilder setSettings(Map<String,Object> settings)
settings
- repository-specific snapshot settingspublic CreateSnapshotRequestBuilder setIncludeGlobalState(boolean includeGlobalState)
includeGlobalState
- true if snapshot should include global cluster stateprotected void doExecute(ActionListener<CreateSnapshotResponse> listener)
Copyright © 2009–2015. All rights reserved.