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:
Streamable,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 booleanignoreUnavailable()Returns whether the request permits unavailable snapshots to be ignored.SnapshotsStatusRequestignoreUnavailable(boolean ignoreUnavailable)Set totrueto ignore unavailable snapshots, instead of throwing an exception.voidreadFrom(StreamInput in)Set this object's fields from a StreamInput.java.lang.Stringrepository()Returns repository nameSnapshotsStatusRequestrepository(java.lang.String repository)Sets repository namejava.lang.String[]snapshots()Returns the names of the snapshots.SnapshotsStatusRequestsnapshots(java.lang.String[] snapshots)Sets the list of snapshots to be returnedActionRequestValidationExceptionvalidate()voidwriteTo(StreamOutput out)Write this object's fields to a 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
-
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 Detail
-
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
public SnapshotsStatusRequest(StreamInput in) throws java.io.IOException
- 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 Detail
-
writeTo
public void writeTo(StreamOutput out) throws java.io.IOException
Description copied from interface:StreamableWrite this object's fields to a StreamOutput.- Specified by:
writeToin interfaceStreamable- Specified by:
writeToin interfaceWriteable- Overrides:
writeToin classMasterNodeRequest<SnapshotsStatusRequest>- Throws:
java.io.IOException
-
validate
public ActionRequestValidationException validate()
- Specified by:
validatein classActionRequest
-
repository
public SnapshotsStatusRequest repository(java.lang.String 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
public SnapshotsStatusRequest snapshots(java.lang.String[] snapshots)
Sets the list of snapshots to be returned- Returns:
- this request
-
ignoreUnavailable
public SnapshotsStatusRequest ignoreUnavailable(boolean ignoreUnavailable)
Set totrueto 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
-
readFrom
public void readFrom(StreamInput in) throws java.io.IOException
Description copied from interface:StreamableSet this object's fields from a StreamInput.- Specified by:
readFromin interfaceStreamable- Overrides:
readFromin classMasterNodeRequest<SnapshotsStatusRequest>- Throws:
java.io.IOException
-
-