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 snapshots
-
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.void
readFrom(StreamInput in)
Set this object's fields from a StreamInput.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 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(java.lang.String repository)
Constructs a new get snapshots request with given repository name- Parameters:
repository
- repository name
-
-
Method Detail
-
validate
public ActionRequestValidationException validate()
- Specified by:
validate
in 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 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
-
readFrom
public void readFrom(StreamInput in) throws java.io.IOException
Description copied from interface:Streamable
Set this object's fields from a StreamInput.- Specified by:
readFrom
in interfaceStreamable
- Overrides:
readFrom
in classMasterNodeRequest<SnapshotsStatusRequest>
- Throws:
java.io.IOException
-
writeTo
public void writeTo(StreamOutput out) throws java.io.IOException
Description copied from interface:Streamable
Write this object's fields to a StreamOutput.- Specified by:
writeTo
in interfaceStreamable
- Specified by:
writeTo
in interfaceWriteable
- Overrides:
writeTo
in classMasterNodeRequest<SnapshotsStatusRequest>
- Throws:
java.io.IOException
-
-