public class SnapshotShardFailure extends java.lang.Object implements ShardOperationFailedException
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
EMPTY_PARAMS
Constructor and Description |
---|
SnapshotShardFailure(java.lang.String nodeId,
ShardId shardId,
java.lang.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
|
java.lang.Throwable |
getCause()
The cause of this failure
|
java.lang.String |
index()
Returns index where failure occurred
|
java.lang.String |
nodeId()
Returns node id where failure occurred
|
void |
readFrom(StreamInput in)
Set this object's fields from a StreamInput.
|
static SnapshotShardFailure |
readSnapshotShardFailure(StreamInput in)
Reads shard failure information from stream input
|
java.lang.String |
reason()
Returns reason for the failure
|
int |
shardId()
Returns shard id where failure occurred
|
RestStatus |
status()
Returns REST status corresponding to this failure
|
java.lang.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)
Write this object's fields to a StreamOutput.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
isFragment
public java.lang.String index()
index
in interface ShardOperationFailedException
public int shardId()
shardId
in interface ShardOperationFailedException
public java.lang.String reason()
reason
in interface ShardOperationFailedException
public RestStatus status()
status
in interface ShardOperationFailedException
public java.lang.Throwable getCause()
ShardOperationFailedException
getCause
in interface ShardOperationFailedException
@Nullable public java.lang.String nodeId()
public static SnapshotShardFailure readSnapshotShardFailure(StreamInput in) throws java.io.IOException
in
- stream inputjava.io.IOException
public void readFrom(StreamInput in) throws java.io.IOException
Streamable
readFrom
in interface Streamable
java.io.IOException
public void writeTo(StreamOutput out) throws java.io.IOException
Streamable
writeTo
in interface Streamable
java.io.IOException
public java.lang.String toString()
toString
in class java.lang.Object
public static void toXContent(SnapshotShardFailure snapshotShardFailure, XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
snapshotShardFailure
- snapshot failure informationbuilder
- XContent builderparams
- additional parametersjava.io.IOException
public static SnapshotShardFailure fromXContent(XContentParser parser) throws java.io.IOException
parser
- JSON parserjava.io.IOException
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
toXContent
in interface ToXContent
java.io.IOException