public static class BulkItemResponse.Failure extends java.lang.Object implements Writeable, ToXContentFragment
Writeable.Reader<V>, Writeable.Writer<V>
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
EMPTY_PARAMS
Constructor and Description |
---|
Failure(StreamInput in)
Read from a stream.
|
Failure(java.lang.String index,
java.lang.String type,
java.lang.String id,
java.lang.Exception cause)
For write failures before operation was assigned a sequence number.
|
Failure(java.lang.String index,
java.lang.String type,
java.lang.String id,
java.lang.Exception cause,
boolean aborted) |
Failure(java.lang.String index,
java.lang.String type,
java.lang.String id,
java.lang.Exception cause,
long seqNo)
For write failures after operation was assigned a sequence number.
|
Failure(java.lang.String index,
java.lang.String type,
java.lang.String id,
java.lang.Exception cause,
RestStatus status) |
Failure(java.lang.String index,
java.lang.String type,
java.lang.String id,
java.lang.Exception cause,
RestStatus status,
long seqNo,
boolean aborted) |
Modifier and Type | Method and Description |
---|---|
java.lang.Exception |
getCause()
The actual cause of the failure.
|
java.lang.String |
getId()
The id of the action.
|
java.lang.String |
getIndex()
The index name of the action.
|
java.lang.String |
getMessage()
The failure message.
|
long |
getSeqNo()
The operation sequence number generated by primary
NOTE:
SequenceNumbers.UNASSIGNED_SEQ_NO
indicates sequence number was not generated by primary |
RestStatus |
getStatus()
The rest status.
|
java.lang.String |
getType()
The type of the action.
|
boolean |
isAborted()
Whether this failure is the result of an abort.
|
java.lang.String |
toString() |
XContentBuilder |
toXContent(XContentBuilder builder,
ToXContent.Params params) |
void |
writeTo(StreamOutput out)
Write this into the StreamOutput.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
isFragment
public Failure(java.lang.String index, java.lang.String type, java.lang.String id, java.lang.Exception cause)
#Failure(String, String, String, Exception, long)
}
to record operation sequence no with failurepublic Failure(java.lang.String index, java.lang.String type, java.lang.String id, java.lang.Exception cause, boolean aborted)
public Failure(java.lang.String index, java.lang.String type, java.lang.String id, java.lang.Exception cause, RestStatus status)
public Failure(java.lang.String index, java.lang.String type, java.lang.String id, java.lang.Exception cause, long seqNo)
public Failure(java.lang.String index, java.lang.String type, java.lang.String id, java.lang.Exception cause, RestStatus status, long seqNo, boolean aborted)
public Failure(StreamInput in) throws java.io.IOException
java.io.IOException
public void writeTo(StreamOutput out) throws java.io.IOException
Writeable
public java.lang.String getIndex()
public java.lang.String getType()
public java.lang.String getId()
public java.lang.String getMessage()
public RestStatus getStatus()
public java.lang.Exception getCause()
public long getSeqNo()
SequenceNumbers.UNASSIGNED_SEQ_NO
indicates sequence number was not generated by primarypublic boolean isAborted()
true
, the request to which this failure relates should never be retried, regardless of the cause
.BulkItemRequest.abort(String, Exception)
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
toXContent
in interface ToXContent
java.io.IOException
public java.lang.String toString()
toString
in class java.lang.Object