public class GetSnapshotsRequest extends MasterNodeRequest<GetSnapshotsRequest>
TransportRequest.Empty
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ALL_SNAPSHOTS |
static java.lang.String |
CURRENT_SNAPSHOT |
static boolean |
DEFAULT_VERBOSE_MODE |
DEFAULT_MASTER_NODE_TIMEOUT, masterNodeTimeout
Constructor and Description |
---|
GetSnapshotsRequest() |
GetSnapshotsRequest(java.lang.String repository)
Constructs a new get snapshots request with given repository name
|
GetSnapshotsRequest(java.lang.String repository,
java.lang.String[] snapshots)
Constructs a new get snapshots request with given repository name and list of snapshots
|
Modifier and Type | Method and Description |
---|---|
boolean |
ignoreUnavailable() |
GetSnapshotsRequest |
ignoreUnavailable(boolean ignoreUnavailable)
Set to true to ignore unavailable snapshots
|
void |
readFrom(StreamInput in)
Set this object's fields from a StreamInput.
|
java.lang.String |
repository()
Returns repository name
|
GetSnapshotsRequest |
repository(java.lang.String repository)
Sets repository name
|
java.lang.String[] |
snapshots()
Returns the names of the snapshots.
|
GetSnapshotsRequest |
snapshots(java.lang.String[] snapshots)
Sets the list of snapshots to be returned
|
ActionRequestValidationException |
validate() |
boolean |
verbose()
Returns whether the request will return a verbose response.
|
GetSnapshotsRequest |
verbose(boolean verbose)
Set to
false to only show the snapshot names and the indices they contain. |
void |
writeTo(StreamOutput out)
Write this object's fields to a StreamOutput.
|
masterNodeTimeout, masterNodeTimeout, masterNodeTimeout
getShouldStoreResult
getParentTask, setParentTask
remoteAddress, remoteAddress
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
createTask, getDescription, setParentTask
public static final java.lang.String ALL_SNAPSHOTS
public static final java.lang.String CURRENT_SNAPSHOT
public static final boolean DEFAULT_VERBOSE_MODE
public GetSnapshotsRequest()
public GetSnapshotsRequest(java.lang.String repository, java.lang.String[] snapshots)
repository
- repository namesnapshots
- list of snapshotspublic GetSnapshotsRequest(java.lang.String repository)
repository
- repository namepublic ActionRequestValidationException validate()
validate
in class ActionRequest
public GetSnapshotsRequest repository(java.lang.String repository)
repository
- repository namepublic java.lang.String repository()
public java.lang.String[] snapshots()
public GetSnapshotsRequest snapshots(java.lang.String[] snapshots)
public GetSnapshotsRequest ignoreUnavailable(boolean ignoreUnavailable)
public boolean ignoreUnavailable()
public GetSnapshotsRequest verbose(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.public boolean verbose()
public void readFrom(StreamInput in) throws java.io.IOException
Streamable
readFrom
in interface Streamable
readFrom
in class MasterNodeRequest<GetSnapshotsRequest>
java.io.IOException
public void writeTo(StreamOutput out) throws java.io.IOException
Streamable
writeTo
in interface Streamable
writeTo
in class MasterNodeRequest<GetSnapshotsRequest>
java.io.IOException