public class BulkItemRequest extends java.lang.Object implements Streamable
Constructor and Description |
---|
BulkItemRequest(int id,
DocWriteRequest request) |
Modifier and Type | Method and Description |
---|---|
void |
abort(java.lang.String index,
java.lang.Exception cause)
Abort this request, and store a
BulkItemResponse.Failure response. |
int |
id() |
java.lang.String |
index() |
static BulkItemRequest |
readBulkItem(StreamInput in) |
void |
readFrom(StreamInput in)
Set this object's fields from a StreamInput.
|
DocWriteRequest |
request() |
void |
writeTo(StreamOutput out)
Write this object's fields to a StreamOutput.
|
public BulkItemRequest(int id, DocWriteRequest request)
public int id()
public DocWriteRequest request()
public java.lang.String index()
public void abort(java.lang.String index, java.lang.Exception cause)
BulkItemResponse.Failure
response.index
- The concrete index that was resolved for this requestcause
- The cause of the rejection (may not be null)java.lang.IllegalStateException
- If a response already exists for this requestpublic static BulkItemRequest readBulkItem(StreamInput in) throws java.io.IOException
java.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