public class SnapshotShardFailure extends Object implements ShardOperationFailedException
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
EMPTY_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 ShardOperationFailedException
public int shardId()
shardId
in interface ShardOperationFailedException
public String reason()
reason
in interface ShardOperationFailedException
public RestStatus status()
status
in interface ShardOperationFailedException
public Throwable getCause()
ShardOperationFailedException
getCause
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
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException
toXContent
in interface ToXContent
IOException
Copyright © 2009–2016. All rights reserved.