public class SnapshotShardFailure extends Object implements ShardOperationFailedException
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.ParamsEMPTY_PARAMS| 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
|
Throwable |
getCause()
The cause of this failure.
|
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
|
XContentBuilder |
toXContent(XContentBuilder builder,
ToXContent.Params params) |
void |
writeTo(StreamOutput out) |
public String index()
index in interface ShardOperationFailedExceptionpublic int shardId()
shardId in interface ShardOperationFailedExceptionpublic String reason()
reason in interface ShardOperationFailedExceptionpublic RestStatus status()
status in interface ShardOperationFailedExceptionpublic Throwable getCause()
ShardOperationFailedExceptiongetCause in interface ShardOperationFailedExceptionpublic static SnapshotShardFailure readSnapshotShardFailure(StreamInput in) throws IOException
in - stream inputIOExceptionpublic void readFrom(StreamInput in) throws IOException
readFrom in interface StreamableIOExceptionpublic void writeTo(StreamOutput out) throws IOException
writeTo in interface StreamableIOExceptionpublic static void toXContent(SnapshotShardFailure snapshotShardFailure, XContentBuilder builder, ToXContent.Params params) throws IOException
snapshotShardFailure - snapshot failure informationbuilder - XContent builderparams - additional parametersIOExceptionpublic static SnapshotShardFailure fromXContent(XContentParser parser) throws IOException
parser - JSON parserIOExceptionpublic XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException
toXContent in interface ToXContentIOExceptionCopyright © 2009–2017. All rights reserved.