public class SnapshotInfo extends Object implements ToXContent, Streamable
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
EMPTY_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
Can be 0L if snapshot is still running
|
int |
failedShards()
Number of failed shards
|
com.google.common.collect.ImmutableList<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
|
com.google.common.collect.ImmutableList<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) |
void |
writeTo(StreamOutput out) |
public String name()
public SnapshotState state()
public String reason()
public com.google.common.collect.ImmutableList<String> indices()
public long startTime()
public long endTime()
public int totalShards()
public int failedShards()
public int successfulShards()
public com.google.common.collect.ImmutableList<SnapshotShardFailure> shardFailures()
public RestStatus status()
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException
toXContent
in interface ToXContent
IOException
public void readFrom(StreamInput in) throws IOException
readFrom
in interface Streamable
IOException
public void writeTo(StreamOutput out) throws IOException
writeTo
in interface Streamable
IOException
public static SnapshotInfo readSnapshotInfo(StreamInput in) throws IOException
in
- stream inputIOException
public static SnapshotInfo readOptionalSnapshotInfo(StreamInput in) throws IOException
in
- stream inputIOException
Copyright © 2009–2015. All rights reserved.