public class GetSnapshotsRequestBuilder extends MasterNodeOperationRequestBuilder<GetSnapshotsRequest,GetSnapshotsResponse,GetSnapshotsRequestBuilder>
action, client, request
Constructor | Description |
---|---|
GetSnapshotsRequestBuilder(ElasticsearchClient client,
GetSnapshotsAction action) |
Constructs the new get snapshot request
|
GetSnapshotsRequestBuilder(ElasticsearchClient client,
GetSnapshotsAction action,
java.lang.String repository) |
Constructs the new get snapshot request with specified repository
|
Modifier and Type | Method | Description |
---|---|---|
GetSnapshotsRequestBuilder |
addSnapshots(java.lang.String... snapshots) |
Adds additional snapshots to the list of snapshots to return
|
GetSnapshotsRequestBuilder |
setCurrentSnapshot() |
Makes the request to return the current snapshot
|
GetSnapshotsRequestBuilder |
setIgnoreUnavailable(boolean ignoreUnavailable) |
Makes the request ignore unavailable snapshots
|
GetSnapshotsRequestBuilder |
setRepository(java.lang.String repository) |
Sets the repository name
|
GetSnapshotsRequestBuilder |
setSnapshots(java.lang.String... snapshots) |
Sets list of snapshots to return
|
GetSnapshotsRequestBuilder |
setVerbose(boolean verbose) |
Set to
false to only show the snapshot names and the indices they contain. |
execute, execute, get, get, get, request
setMasterNodeTimeout, setMasterNodeTimeout
public GetSnapshotsRequestBuilder(ElasticsearchClient client, GetSnapshotsAction action)
public GetSnapshotsRequestBuilder(ElasticsearchClient client, GetSnapshotsAction action, java.lang.String repository)
public GetSnapshotsRequestBuilder setRepository(java.lang.String repository)
repository
- repository namepublic GetSnapshotsRequestBuilder setSnapshots(java.lang.String... snapshots)
snapshots
- list of snapshotspublic GetSnapshotsRequestBuilder setCurrentSnapshot()
public GetSnapshotsRequestBuilder addSnapshots(java.lang.String... snapshots)
snapshots
- additional snapshotspublic GetSnapshotsRequestBuilder setIgnoreUnavailable(boolean ignoreUnavailable)
ignoreUnavailable
- true to ignore unavailable snapshots.public GetSnapshotsRequestBuilder setVerbose(boolean verbose)
false
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 to true
, which returns all information
about each requested snapshot.