Package org.elasticsearch.snapshots
Class RestoreInfo
- java.lang.Object
-
- org.elasticsearch.snapshots.RestoreInfo
-
- All Implemented Interfaces:
Writeable,ToXContent,ToXContentObject
public class RestoreInfo extends Object implements ToXContentObject, Writeable
Information about successfully completed restore operation.Returned as part of
RestoreSnapshotResponse
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
-
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V>
-
-
Field Summary
-
Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMS
-
-
Constructor Summary
Constructors Constructor Description RestoreInfo(String name, List<String> indices, int totalShards, int successfulShards)RestoreInfo(StreamInput in)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)intfailedShards()Number of failed shardsstatic RestoreInfofromXContent(XContentParser parser)inthashCode()List<String>indices()List of restored indicesStringname()Snapshot namestatic RestoreInforeadOptionalRestoreInfo(StreamInput in)Reads optional restore info fromStreamInputRestStatusstatus()REST status of the operationintsuccessfulShards()Number of successful shardsStringtoString()inttotalShards()Number of shards being restoredXContentBuildertoXContent(XContentBuilder builder, ToXContent.Params params)voidwriteTo(StreamOutput out)Write this into the StreamOutput.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.elasticsearch.common.xcontent.ToXContentObject
isFragment
-
-
-
-
Constructor Detail
-
RestoreInfo
public RestoreInfo(String name, List<String> indices, int totalShards, int successfulShards)
-
RestoreInfo
public RestoreInfo(StreamInput in) throws IOException
- Throws:
IOException
-
-
Method Detail
-
name
public String name()
Snapshot name- Returns:
- snapshot name
-
totalShards
public int totalShards()
Number of shards being restored- Returns:
- number of being restored
-
failedShards
public int failedShards()
Number of failed shards- Returns:
- number of failed shards
-
successfulShards
public int successfulShards()
Number of successful shards- Returns:
- number of successful shards
-
status
public RestStatus status()
REST status of the operation- Returns:
- REST status
-
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException
- Specified by:
toXContentin interfaceToXContent- Throws:
IOException
-
fromXContent
public static RestoreInfo fromXContent(XContentParser parser) throws IOException
- Throws:
IOException
-
writeTo
public void writeTo(StreamOutput out) throws IOException
Description copied from interface:WriteableWrite this into the StreamOutput.- Specified by:
writeToin interfaceWriteable- Throws:
IOException
-
readOptionalRestoreInfo
public static RestoreInfo readOptionalRestoreInfo(StreamInput in) throws IOException
Reads optional restore info fromStreamInput- Parameters:
in- stream input- Returns:
- restore info
- Throws:
IOException
-
-