public class Snapshot extends Object implements Comparable<Snapshot>, ToXContent, FromXContentBuilder<Snapshot>
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params| Modifier and Type | Field and Description |
|---|---|
static Snapshot |
PROTO |
EMPTY_PARAMS| Constructor and Description |
|---|
Snapshot(String name,
List<String> indices,
long startTime) |
Snapshot(String name,
List<String> indices,
long startTime,
String reason,
long endTime,
int totalShard,
List<SnapshotShardFailure> shardFailures) |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(Snapshot o)
Compares two snapshots by their start time
|
long |
endTime()
Returns time when snapshot ended
|
boolean |
equals(Object o) |
static Snapshot |
fromXContent(XContentParser parser) |
Snapshot |
fromXContent(XContentParser parser,
ParseFieldMatcher parseFieldMatcher)
Parses an object with the type T from parser
|
int |
hashCode() |
List<String> |
indices()
Returns indices that were included into this snapshot
|
String |
name()
Returns snapshot name
|
String |
reason()
Returns reason for complete snapshot failure
|
List<SnapshotShardFailure> |
shardFailures()
Returns shard failures
|
long |
startTime()
Returns time when snapshot started
|
SnapshotState |
state()
Returns current snapshot state
|
int |
successfulShards()
Returns total number of shards that were successfully snapshotted
|
int |
totalShard()
Returns total number of shards that were snapshotted
|
XContentBuilder |
toXContent(XContentBuilder builder,
ToXContent.Params params) |
Version |
version()
Returns version of Elasticsearch that was used to create this snapshot
|
public static final Snapshot PROTO
public String name()
public SnapshotState state()
public String reason()
public Version version()
public List<String> indices()
public long startTime()
public long endTime()
Can be 0L if snapshot is still running
public int totalShard()
public int successfulShards()
public List<SnapshotShardFailure> shardFailures()
public int compareTo(Snapshot o)
compareTo in interface Comparable<Snapshot>o - other snapshot0 if snapshots were created at the same time;
a value less than 0 if this snapshot was created before snapshot o; and
a value greater than 0 if this snapshot was created after snapshot o;public Snapshot fromXContent(XContentParser parser, ParseFieldMatcher parseFieldMatcher) throws IOException
FromXContentBuilderfromXContent in interface FromXContentBuilder<Snapshot>IOExceptionpublic XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException
toXContent in interface ToXContentIOExceptionpublic static Snapshot fromXContent(XContentParser parser) throws IOException
IOExceptionCopyright © 2009–2017. All rights reserved.