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.core.RefCounted
,TaskAwareRequest
Get snapshot request
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static class
Nested classes/interfaces inherited from class org.elasticsearch.transport.TransportRequest
TransportRequest.Empty
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V>
-
Field Summary
Modifier and TypeFieldDescriptionstatic String
static String
static boolean
static Version
static int
static Version
Fields inherited from class org.elasticsearch.action.support.master.MasterNodeRequest
DEFAULT_MASTER_NODE_TIMEOUT, masterNodeTimeout
-
Constructor Summary
ConstructorDescriptionGetSnapshotsRequest(String... repositories)
Constructs a new get snapshots request with given repository namesGetSnapshotsRequest(String[] repositories, String[] snapshots)
Constructs a new get snapshots request with given repository names and list of snapshotsGetSnapshotsRequest(String repository, String[] snapshots)
Constructs a new get snapshots request with given repository name and list of snapshots -
Method Summary
Modifier and TypeMethodDescriptionafter()
after(GetSnapshotsRequest.After after)
Returns the task object that should be used to keep track of the processing of the request.boolean
ignoreUnavailable(boolean ignoreUnavailable)
Set to true to ignore unavailable snapshotsboolean
order()
String[]
Returns repository namesrepositories(String... repositories)
Sets repository namesReturns repository namerepository(String repository)
Sets repository nameint
size()
size(int size)
String[]
Returns the names of the snapshots.Sets the list of snapshots to be returnedsort()
validate()
boolean
verbose()
Returns whether the request will return a verbose response.verbose(boolean verbose)
Set tofalse
to only show the snapshot names and the indices they contain.void
writeTo(StreamOutput out)
Write this into the StreamOutput.Methods inherited from class org.elasticsearch.action.support.master.MasterNodeRequest
masterNodeTimeout, masterNodeTimeout, masterNodeTimeout
Methods inherited from class org.elasticsearch.action.ActionRequest
getShouldStoreResult
Methods inherited from class org.elasticsearch.transport.TransportRequest
getParentTask, setParentTask, toString
Methods inherited from class org.elasticsearch.transport.TransportMessage
decRef, incRef, remoteAddress, remoteAddress, tryIncRef
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.elasticsearch.tasks.TaskAwareRequest
getDescription, setParentTask
-
Field Details
-
ALL_SNAPSHOTS
- See Also:
- Constant Field Values
-
CURRENT_SNAPSHOT
- See Also:
- Constant Field Values
-
DEFAULT_VERBOSE_MODE
public static final boolean DEFAULT_VERBOSE_MODE- See Also:
- Constant Field Values
-
MULTIPLE_REPOSITORIES_SUPPORT_ADDED
-
PAGINATED_GET_SNAPSHOTS_VERSION
-
NO_LIMIT
public static final int NO_LIMIT- See Also:
- Constant Field Values
-
-
Constructor Details
-
GetSnapshotsRequest
public GetSnapshotsRequest() -
GetSnapshotsRequest
Constructs a new get snapshots request with given repository name and list of snapshots- Parameters:
repository
- repository namesnapshots
- list of snapshots
-
GetSnapshotsRequest
Constructs a new get snapshots request with given repository names and list of snapshots- Parameters:
repositories
- repository namessnapshots
- list of snapshots
-
GetSnapshotsRequest
Constructs a new get snapshots request with given repository names- Parameters:
repositories
- repository names
-
GetSnapshotsRequest
- Throws:
IOException
-
-
Method Details
-
writeTo
Description copied from interface:Writeable
Write this into the StreamOutput.- Specified by:
writeTo
in interfaceWriteable
- Overrides:
writeTo
in classMasterNodeRequest<GetSnapshotsRequest>
- Throws:
IOException
-
validate
- Specified by:
validate
in classActionRequest
-
repositories
Sets repository names- Parameters:
repositories
- repository names- Returns:
- this request
-
repositories
Returns repository names- Returns:
- repository names
-
isSingleRepositoryRequest
public boolean isSingleRepositoryRequest() -
repository
Sets repository name- Parameters:
repository
- repository name- Returns:
- this request
-
repository
Returns repository name- Returns:
- repository name
-
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 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. -
after
-
sort
-
after
-
sort
-
size
-
size
public int size() -
order
-
order
-
verbose
public boolean verbose()Returns whether the request will return a verbose response. -
createTask
public Task createTask(long id, String type, String action, TaskId parentTaskId, Map<String,String> headers)Description copied from interface:TaskAwareRequest
Returns the task object that should be used to keep track of the processing of the request.
-