public class DeleteSnapshotRequest extends MasterNodeRequest<DeleteSnapshotRequest>
Delete snapshot request removes the snapshot record from the repository and cleans up all files that are associated with this particular snapshot. All files that are shared with at least one other existing snapshot are left intact.
TransportRequest.Empty
DEFAULT_MASTER_NODE_TIMEOUT, masterNodeTimeout
headers
Constructor and Description |
---|
DeleteSnapshotRequest()
Constructs a new delete snapshots request
|
DeleteSnapshotRequest(String repository)
Constructs a new delete snapshots request with repository name
|
DeleteSnapshotRequest(String repository,
String snapshot)
Constructs a new delete snapshots request with repository and snapshot name
|
Modifier and Type | Method and Description |
---|---|
void |
readFrom(StreamInput in) |
String |
repository()
Returns repository name
|
DeleteSnapshotRequest |
repository(String repository) |
String |
snapshot()
Returns repository name
|
DeleteSnapshotRequest |
snapshot(String snapshot)
Sets snapshot name
|
ActionRequestValidationException |
validate() |
void |
writeTo(StreamOutput out) |
masterNodeTimeout, masterNodeTimeout, masterNodeTimeout
createTask, createTask, setParentTask
getDescription
remoteAddress, remoteAddress
contextSize, copyContextAndHeadersFrom, copyContextFrom, copyHeadersFrom, getContext, getFromContext, getFromContext, getHeader, getHeaders, hasHeader, hasInContext, isContextEmpty, putAllInContext, putHeader, putInContext
public DeleteSnapshotRequest()
public DeleteSnapshotRequest(String repository, String snapshot)
repository
- repository namesnapshot
- snapshot namepublic DeleteSnapshotRequest(String repository)
repository
- repository namepublic ActionRequestValidationException validate()
validate
in class ActionRequest<DeleteSnapshotRequest>
public DeleteSnapshotRequest repository(String repository)
public String repository()
public String snapshot()
public DeleteSnapshotRequest snapshot(String snapshot)
public void readFrom(StreamInput in) throws IOException
readFrom
in interface Streamable
readFrom
in class MasterNodeRequest<DeleteSnapshotRequest>
IOException
public void writeTo(StreamOutput out) throws IOException
writeTo
in interface Streamable
writeTo
in class MasterNodeRequest<DeleteSnapshotRequest>
IOException
Copyright © 2009–2016. All rights reserved.