Class GetSnapshotsRequestBuilder
java.lang.Object
org.elasticsearch.action.ActionRequestBuilder<Request,Response>
org.elasticsearch.action.support.master.MasterNodeOperationRequestBuilder<GetSnapshotsRequest,GetSnapshotsResponse,GetSnapshotsRequestBuilder>
org.elasticsearch.action.admin.cluster.snapshots.get.GetSnapshotsRequestBuilder
public class GetSnapshotsRequestBuilder
extends MasterNodeOperationRequestBuilder<GetSnapshotsRequest,GetSnapshotsResponse,GetSnapshotsRequestBuilder>
Get snapshots request builder
-
Field Summary
Fields inherited from class org.elasticsearch.action.ActionRequestBuilder
action, client, request
-
Constructor Summary
ConstructorDescriptionGetSnapshotsRequestBuilder(ElasticsearchClient client, GetSnapshotsAction action)
Constructs the new get snapshot requestGetSnapshotsRequestBuilder(ElasticsearchClient client, GetSnapshotsAction action, String repository)
Constructs the new get snapshot request with specified repositoryGetSnapshotsRequestBuilder(ElasticsearchClient client, GetSnapshotsAction action, String... repositories)
Constructs the new get snapshot request with specified repositories -
Method Summary
Modifier and TypeMethodDescriptionaddSnapshots(String... snapshots)
Adds additional snapshots to the list of snapshots to returnMakes the request to return the current snapshotsetIgnoreUnavailable(boolean ignoreUnavailable)
Makes the request ignore unavailable snapshotssetRepositories(String... repositories)
Sets the repository namessetRepository(String repository)
Sets the repository namesetSize(int size)
setSnapshots(String... snapshots)
Sets list of snapshots to returnsetVerbose(boolean verbose)
Set tofalse
to only show the snapshot names and the indices they contain.Methods inherited from class org.elasticsearch.action.support.master.MasterNodeOperationRequestBuilder
setMasterNodeTimeout, setMasterNodeTimeout
-
Constructor Details
-
GetSnapshotsRequestBuilder
Constructs the new get snapshot request -
GetSnapshotsRequestBuilder
public GetSnapshotsRequestBuilder(ElasticsearchClient client, GetSnapshotsAction action, String repository)Constructs the new get snapshot request with specified repository -
GetSnapshotsRequestBuilder
public GetSnapshotsRequestBuilder(ElasticsearchClient client, GetSnapshotsAction action, String... repositories)Constructs the new get snapshot request with specified repositories
-
-
Method Details
-
setRepository
Sets the repository name- Parameters:
repository
- repository name- Returns:
- this builder
-
setRepositories
Sets the repository names- Parameters:
repositories
- repository names- Returns:
- this builder
-
setSnapshots
Sets list of snapshots to return- Parameters:
snapshots
- list of snapshots- Returns:
- this builder
-
setCurrentSnapshot
Makes the request to return the current snapshot- Returns:
- this builder
-
addSnapshots
Adds additional snapshots to the list of snapshots to return- Parameters:
snapshots
- additional snapshots- Returns:
- this builder
-
setVerbose
Set tofalse
to only show the snapshot names and the indices they contain. This is useful when the snapshots belong to a cloud-based repository where each blob read is a concern (cost wise and performance wise), as the snapshot names and indices they contain can be retrieved from a single index blob in the repository, whereas the rest of the information requires reading a snapshot metadata file for each snapshot requested. Defaults totrue
, which returns all information about each requested snapshot. -
setAfter
-
setAfter
-
setSort
-
setSize
-
setOrder
-