public class SnapshotInfo extends Object implements ToXContent, Streamable
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.ParamsEMPTY_PARAMS| Constructor and Description |
|---|
SnapshotInfo(Snapshot snapshot)
Creates a new snapshot information from a
Snapshot |
| Modifier and Type | Method and Description |
|---|---|
long |
endTime()
Returns time when snapshot ended
|
int |
failedShards()
Number of failed shards
|
List<String> |
indices()
Returns indices that were included into this snapshot
|
String |
name()
Returns snapshot name
|
void |
readFrom(StreamInput in) |
static SnapshotInfo |
readOptionalSnapshotInfo(StreamInput in)
Reads optional snapshot information from stream input
|
static SnapshotInfo |
readSnapshotInfo(StreamInput in)
Reads snapshot information from stream input
|
String |
reason()
Returns snapshot failure reason
|
List<SnapshotShardFailure> |
shardFailures()
Returns shard failures
|
long |
startTime()
Returns time when snapshot started
|
SnapshotState |
state()
Returns snapshot state
|
RestStatus |
status()
Returns snapshot REST status
|
int |
successfulShards()
Returns total number of shards that were successfully snapshotted
|
int |
totalShards()
Returns total number of shards that were snapshotted
|
XContentBuilder |
toXContent(XContentBuilder builder,
ToXContent.Params params) |
Version |
version()
Returns the version of elasticsearch that the snapshot was created with
|
void |
writeTo(StreamOutput out) |
public String name()
public SnapshotState state()
public String reason()
public List<String> indices()
public long startTime()
public long endTime()
Can be 0L if snapshot is still running
public int totalShards()
public int failedShards()
public int successfulShards()
public List<SnapshotShardFailure> shardFailures()
public Version version()
public RestStatus status()
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException
toXContent in interface ToXContentIOExceptionpublic void readFrom(StreamInput in) throws IOException
readFrom in interface StreamableIOExceptionpublic void writeTo(StreamOutput out) throws IOException
writeTo in interface StreamableIOExceptionpublic static SnapshotInfo readSnapshotInfo(StreamInput in) throws IOException
in - stream inputIOExceptionpublic static SnapshotInfo readOptionalSnapshotInfo(StreamInput in) throws IOException
in - stream inputIOExceptionCopyright © 2009–2017. All rights reserved.