public class SnapshotShardFailure extends Object implements ShardOperationFailedException
Constructor and Description |
---|
SnapshotShardFailure(String nodeId,
String index,
int shardId,
String reason)
Constructs new snapshot shard failure object
|
Modifier and Type | Method and Description |
---|---|
static SnapshotShardFailure |
fromXContent(XContentParser parser)
Deserializes snapshot failure information from JSON
|
String |
index()
Returns index where failure occurred
|
String |
nodeId()
Returns node id where failure occurred
|
void |
readFrom(StreamInput in) |
static SnapshotShardFailure |
readSnapshotShardFailure(StreamInput in)
Reads shard failure information from stream input
|
String |
reason()
Returns reason for the failure
|
int |
shardId()
Returns shard id where failure occurred
|
RestStatus |
status()
Returns REST status corresponding to this failure
|
String |
toString() |
static void |
toXContent(SnapshotShardFailure snapshotShardFailure,
XContentBuilder builder,
ToXContent.Params params)
Serializes snapshot failure information into JSON
|
void |
writeTo(StreamOutput out) |
public String index()
index
in interface ShardOperationFailedException
public int shardId()
shardId
in interface ShardOperationFailedException
public String reason()
reason
in interface ShardOperationFailedException
public RestStatus status()
status
in interface ShardOperationFailedException
public static SnapshotShardFailure readSnapshotShardFailure(StreamInput in) throws IOException
in
- stream inputIOException
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 void toXContent(SnapshotShardFailure snapshotShardFailure, XContentBuilder builder, ToXContent.Params params) throws IOException
snapshotShardFailure
- snapshot failure informationbuilder
- XContent builderparams
- additional parametersIOException
public static SnapshotShardFailure fromXContent(XContentParser parser) throws IOException
parser
- JSON parserIOException
Copyright © 2009–2015. All rights reserved.