Module org.elasticsearch.server
Class DeleteSnapshotRequest
java.lang.Object
org.elasticsearch.transport.TransportMessage
org.elasticsearch.transport.TransportRequest
org.elasticsearch.action.ActionRequest
org.elasticsearch.action.LegacyActionRequest
org.elasticsearch.action.support.master.MasterNodeRequest<DeleteSnapshotRequest>
org.elasticsearch.action.admin.cluster.snapshots.delete.DeleteSnapshotRequest
- All Implemented Interfaces:
Writeable,RefCounted,TaskAwareRequest
Delete snapshot request
Delete snapshot request removes snapshots from the repository and cleans up all files that are associated with the snapshots. All files that are shared with at least one other existing snapshot are left intact.
-
Nested Class Summary
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
TRAPPY_IMPLICIT_DEFAULT_MASTER_NODE_TIMEOUTFields inherited from interface org.elasticsearch.core.RefCounted
ALWAYS_REFERENCED -
Constructor Summary
ConstructorsConstructorDescriptionDeleteSnapshotRequest(TimeValue masterNodeTimeout, String repository, String... snapshots) Constructs a new delete snapshots request with repository and snapshot names -
Method Summary
Modifier and TypeMethodDescriptionReturns optional description of the request to be displayed by the task managerReturns repository namerepository(String repository) String[]Returns snapshot namesSets snapshot namesvalidate()booleanReturns true if the request should wait for the snapshot delete(s) to complete before returningwaitForCompletion(boolean waitForCompletion) If set to false the operation should return without waiting for the deletion to complete.voidwriteTo(StreamOutput out) Write this into the StreamOutput.Methods inherited from class org.elasticsearch.action.support.master.MasterNodeRequest
infiniteMasterNodeTimeout, masterNodeTimeout, masterNodeTimeout, masterTermMethods inherited from class org.elasticsearch.action.ActionRequest
getShouldStoreResultMethods inherited from class org.elasticsearch.transport.TransportRequest
getParentTask, getRequestId, setParentTask, setRequestId, toStringMethods inherited from class org.elasticsearch.transport.TransportMessage
decRef, hasReferences, incRef, remoteAddress, remoteAddress, tryIncRefMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.elasticsearch.core.RefCounted
mustIncRefMethods inherited from interface org.elasticsearch.tasks.TaskAwareRequest
createTask, setParentTask
-
Constructor Details
-
DeleteSnapshotRequest
Constructs a new delete snapshots request with repository and snapshot names- Parameters:
repository- repository namesnapshots- snapshot names
-
DeleteSnapshotRequest
- Throws:
IOException
-
-
Method Details
-
writeTo
Description copied from interface:WriteableWrite this into the StreamOutput.- Specified by:
writeToin interfaceWriteable- Overrides:
writeToin classMasterNodeRequest<DeleteSnapshotRequest>- Throws:
IOException
-
validate
- Specified by:
validatein classActionRequest
-
repository
-
repository
Returns repository name- Returns:
- repository name
-
snapshots
Returns snapshot names- Returns:
- snapshot names
-
snapshots
Sets snapshot names- Returns:
- this request
-
getDescription
Description copied from interface:TaskAwareRequestReturns optional description of the request to be displayed by the task manager -
waitForCompletion
If set to false the operation should return without waiting for the deletion to complete. By default, the operation will wait until all matching snapshots are deleted. It can be changed by setting this flag to false.- Parameters:
waitForCompletion- true if operation should wait for the snapshot deletion- Returns:
- this request
-
waitForCompletion
public boolean waitForCompletion()Returns true if the request should wait for the snapshot delete(s) to complete before returning- Returns:
- true if the request should wait for completion
-