public class SnapshotInfo extends java.lang.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
|
int |
failedShards()
Number of failed shards
|
java.util.List<java.lang.String> |
indices()
Returns indices that were included into this snapshot
|
java.lang.String |
name()
Returns snapshot name
|
void |
readFrom(StreamInput in)
Set this object's fields from a StreamInput.
|
static SnapshotInfo |
readOptionalSnapshotInfo(StreamInput in)
Reads optional snapshot information from stream input
|
static SnapshotInfo |
readSnapshotInfo(StreamInput in)
Reads snapshot information from stream input
|
java.lang.String |
reason()
Returns snapshot failure reason
|
java.util.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)
Write this object's fields to a StreamOutput.
|
public java.lang.String name()
public SnapshotState state()
public java.lang.String reason()
public java.util.List<java.lang.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 java.util.List<SnapshotShardFailure> shardFailures()
public Version version()
public RestStatus status()
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
toXContent
in interface ToXContent
java.io.IOException
public void readFrom(StreamInput in) throws java.io.IOException
Streamable
readFrom
in interface Streamable
java.io.IOException
public void writeTo(StreamOutput out) throws java.io.IOException
Streamable
writeTo
in interface Streamable
java.io.IOException
public static SnapshotInfo readSnapshotInfo(StreamInput in) throws java.io.IOException
in
- stream inputjava.io.IOException
public static SnapshotInfo readOptionalSnapshotInfo(StreamInput in) throws java.io.IOException
in
- stream inputjava.io.IOException