public class GetSnapshotsRequest extends MasterNodeRequest<GetSnapshotsRequest>
TransportRequest.Empty
Modifier and Type | Field and Description |
---|---|
static String |
ALL_SNAPSHOTS |
static String |
CURRENT_SNAPSHOT |
DEFAULT_MASTER_NODE_TIMEOUT, masterNodeTimeout
headers
Constructor and Description |
---|
GetSnapshotsRequest() |
GetSnapshotsRequest(String repository)
Constructs a new get snapshots request with given repository name
|
GetSnapshotsRequest(String repository,
String[] snapshots)
Constructs a new get snapshots request with given repository name and list of snapshots
|
Modifier and Type | Method and Description |
---|---|
boolean |
ignoreUnavailable() |
GetSnapshotsRequest |
ignoreUnavailable(boolean ignoreUnavailable)
Set to true to ignore unavailable snapshots
|
void |
readFrom(StreamInput in) |
String |
repository()
Returns repository name
|
GetSnapshotsRequest |
repository(String repository)
Sets repository name
|
String[] |
snapshots()
Returns the names of the snapshots.
|
GetSnapshotsRequest |
snapshots(String[] snapshots)
Sets the list of snapshots to be returned
|
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 static final String ALL_SNAPSHOTS
public static final String CURRENT_SNAPSHOT
public GetSnapshotsRequest()
public GetSnapshotsRequest(String repository, String[] snapshots)
repository
- repository namesnapshots
- list of snapshotspublic GetSnapshotsRequest(String repository)
repository
- repository namepublic ActionRequestValidationException validate()
validate
in class ActionRequest<GetSnapshotsRequest>
public GetSnapshotsRequest repository(String repository)
repository
- repository namepublic String repository()
public String[] snapshots()
public GetSnapshotsRequest snapshots(String[] snapshots)
public GetSnapshotsRequest ignoreUnavailable(boolean ignoreUnavailable)
public boolean ignoreUnavailable()
public void readFrom(StreamInput in) throws IOException
readFrom
in interface Streamable
readFrom
in class MasterNodeRequest<GetSnapshotsRequest>
IOException
public void writeTo(StreamOutput out) throws IOException
writeTo
in interface Streamable
writeTo
in class MasterNodeRequest<GetSnapshotsRequest>
IOException
Copyright © 2009–2016. All rights reserved.