Class SnapshotsStatusRequest
java.lang.Object
org.elasticsearch.transport.TransportMessage
org.elasticsearch.transport.TransportRequest
org.elasticsearch.action.ActionRequest
org.elasticsearch.action.support.master.MasterNodeRequest<SnapshotsStatusRequest>
org.elasticsearch.action.admin.cluster.snapshots.status.SnapshotsStatusRequest
- All Implemented Interfaces:
Writeable
,TaskAwareRequest
public class SnapshotsStatusRequest extends MasterNodeRequest<SnapshotsStatusRequest>
Get snapshot status request
-
Nested Class Summary
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
Fields inherited from class org.elasticsearch.action.support.master.MasterNodeRequest
DEFAULT_MASTER_NODE_TIMEOUT, masterNodeTimeout
-
Constructor Summary
Constructors Constructor Description SnapshotsStatusRequest()
SnapshotsStatusRequest(java.lang.String repository)
Constructs a new get snapshots request with given repository nameSnapshotsStatusRequest(java.lang.String repository, java.lang.String[] snapshots)
Constructs a new get snapshots request with given repository name and list of snapshotsSnapshotsStatusRequest(StreamInput in)
-
Method Summary
Modifier and Type Method Description boolean
ignoreUnavailable()
Returns whether the request permits unavailable snapshots to be ignored.SnapshotsStatusRequest
ignoreUnavailable(boolean ignoreUnavailable)
Set totrue
to ignore unavailable snapshots, instead of throwing an exception.java.lang.String
repository()
Returns repository nameSnapshotsStatusRequest
repository(java.lang.String repository)
Sets repository namejava.lang.String[]
snapshots()
Returns the names of the snapshots.SnapshotsStatusRequest
snapshots(java.lang.String[] snapshots)
Sets the list of snapshots to be returnedActionRequestValidationException
validate()
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.transport.TransportRequest
getParentTask, setParentTask
Methods inherited from class org.elasticsearch.transport.TransportMessage
remoteAddress, remoteAddress
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.elasticsearch.tasks.TaskAwareRequest
createTask, getDescription, setParentTask
-
Constructor Details
-
SnapshotsStatusRequest
public SnapshotsStatusRequest() -
SnapshotsStatusRequest
public SnapshotsStatusRequest(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
-
SnapshotsStatusRequest
- Throws:
java.io.IOException
-
SnapshotsStatusRequest
public SnapshotsStatusRequest(java.lang.String repository)Constructs a new get snapshots request with given repository name- Parameters:
repository
- repository name
-
-
Method Details
-
writeTo
Description copied from interface:Writeable
Write this into the StreamOutput.- Specified by:
writeTo
in interfaceWriteable
- Overrides:
writeTo
in classMasterNodeRequest<SnapshotsStatusRequest>
- Throws:
java.io.IOException
-
validate
- Specified by:
validate
in 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
-
ignoreUnavailable
Set totrue
to ignore unavailable snapshots, instead of throwing an exception. Defaults tofalse
, which means unavailable snapshots cause an exception to be thrown.- Parameters:
ignoreUnavailable
- whether to ignore unavailable snapshots- Returns:
- this request
-
ignoreUnavailable
public boolean ignoreUnavailable()Returns whether the request permits unavailable snapshots to be ignored.- Returns:
- true if the request will ignore unavailable snapshots, false if it will throw an exception on unavailable snapshots
-