Class GetSnapshotsRequest
java.lang.Object
org.elasticsearch.transport.TransportMessage
org.elasticsearch.transport.TransportRequest
org.elasticsearch.action.ActionRequest
org.elasticsearch.action.support.master.MasterNodeRequest<GetSnapshotsRequest>
org.elasticsearch.action.admin.cluster.snapshots.get.GetSnapshotsRequest
- All Implemented Interfaces:
Writeable,org.elasticsearch.common.util.concurrent.RefCounted,TaskAwareRequest
public class GetSnapshotsRequest extends MasterNodeRequest<GetSnapshotsRequest>
Get snapshot request
-
Nested Class Summary
Nested classes/interfaces inherited from class org.elasticsearch.transport.TransportRequest
TransportRequest.EmptyNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
Fields Modifier and Type Field Description static java.lang.StringALL_SNAPSHOTSstatic java.lang.StringCURRENT_SNAPSHOTstatic booleanDEFAULT_VERBOSE_MODEFields inherited from class org.elasticsearch.action.support.master.MasterNodeRequest
DEFAULT_MASTER_NODE_TIMEOUT, masterNodeTimeout -
Constructor Summary
Constructors Constructor Description GetSnapshotsRequest()GetSnapshotsRequest(java.lang.String repository)Constructs a new get snapshots request with given repository nameGetSnapshotsRequest(java.lang.String repository, java.lang.String[] snapshots)Constructs a new get snapshots request with given repository name and list of snapshotsGetSnapshotsRequest(StreamInput in) -
Method Summary
Modifier and Type Method Description booleanignoreUnavailable()GetSnapshotsRequestignoreUnavailable(boolean ignoreUnavailable)Set to true to ignore unavailable snapshotsjava.lang.Stringrepository()Returns repository nameGetSnapshotsRequestrepository(java.lang.String repository)Sets repository namejava.lang.String[]snapshots()Returns the names of the snapshots.GetSnapshotsRequestsnapshots(java.lang.String[] snapshots)Sets the list of snapshots to be returnedActionRequestValidationExceptionvalidate()booleanverbose()Returns whether the request will return a verbose response.GetSnapshotsRequestverbose(boolean verbose)Set tofalseto only show the snapshot names and the indices they contain.voidwriteTo(StreamOutput out)Write this into the StreamOutput.Methods inherited from class org.elasticsearch.action.support.master.MasterNodeRequest
masterNodeTimeout, masterNodeTimeout, masterNodeTimeoutMethods inherited from class org.elasticsearch.action.ActionRequest
getShouldStoreResultMethods inherited from class org.elasticsearch.transport.TransportRequest
getParentTask, setParentTaskMethods inherited from class org.elasticsearch.transport.TransportMessage
decRef, incRef, remoteAddress, remoteAddress, tryIncRefMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.elasticsearch.tasks.TaskAwareRequest
createTask, getDescription, setParentTask
-
Field Details
-
ALL_SNAPSHOTS
public static final java.lang.String ALL_SNAPSHOTS- See Also:
- Constant Field Values
-
CURRENT_SNAPSHOT
public static final java.lang.String CURRENT_SNAPSHOT- See Also:
- Constant Field Values
-
DEFAULT_VERBOSE_MODE
public static final boolean DEFAULT_VERBOSE_MODE- See Also:
- Constant Field Values
-
-
Constructor Details
-
GetSnapshotsRequest
public GetSnapshotsRequest() -
GetSnapshotsRequest
public GetSnapshotsRequest(java.lang.String repository, java.lang.String[] snapshots)Constructs a new get snapshots request with given repository name and list of snapshots- Parameters:
repository- repository namesnapshots- list of snapshots
-
GetSnapshotsRequest
public GetSnapshotsRequest(java.lang.String repository)Constructs a new get snapshots request with given repository name- Parameters:
repository- repository name
-
GetSnapshotsRequest
- Throws:
java.io.IOException
-
-
Method Details
-
writeTo
Description copied from interface:WriteableWrite this into the StreamOutput.- Specified by:
writeToin interfaceWriteable- Overrides:
writeToin classMasterNodeRequest<GetSnapshotsRequest>- Throws:
java.io.IOException
-
validate
- Specified by:
validatein classActionRequest
-
repository
Sets repository name- Parameters:
repository- repository name- Returns:
- this request
-
repository
public java.lang.String repository()Returns repository name- Returns:
- repository name
-
snapshots
public java.lang.String[] snapshots()Returns the names of the snapshots.- Returns:
- the names of snapshots
-
snapshots
Sets the list of snapshots to be returned- Returns:
- this request
-
verbose
Set tofalseto 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. -
verbose
public boolean verbose()Returns whether the request will return a verbose response.
-