Package org.elasticsearch.action.bulk
Class BulkItemRequest
- java.lang.Object
-
- org.elasticsearch.action.bulk.BulkItemRequest
-
- All Implemented Interfaces:
Streamable
public class BulkItemRequest extends java.lang.Object implements Streamable
-
-
Constructor Summary
Constructors Constructor Description BulkItemRequest(int id, DocWriteRequest<?> request)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
abort(java.lang.String index, java.lang.Exception cause)
Abort this request, and store aBulkItemResponse.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.
-
-
-
Constructor Detail
-
BulkItemRequest
public BulkItemRequest(int id, DocWriteRequest<?> request)
-
-
Method Detail
-
id
public int id()
-
request
public DocWriteRequest<?> request()
-
index
public java.lang.String index()
-
abort
public void abort(java.lang.String index, java.lang.Exception cause)
Abort this request, and store aBulkItemResponse.Failure
response.- Parameters:
index
- The concrete index that was resolved for this requestcause
- The cause of the rejection (may not be null)- Throws:
java.lang.IllegalStateException
- If a response already exists for this request
-
readBulkItem
public static BulkItemRequest readBulkItem(StreamInput in) throws java.io.IOException
- Throws:
java.io.IOException
-
readFrom
public void readFrom(StreamInput in) throws java.io.IOException
Description copied from interface:Streamable
Set this object's fields from a StreamInput.- Specified by:
readFrom
in interfaceStreamable
- Throws:
java.io.IOException
-
writeTo
public void writeTo(StreamOutput out) throws java.io.IOException
Description copied from interface:Streamable
Write this object's fields to a StreamOutput.- Specified by:
writeTo
in interfaceStreamable
- Throws:
java.io.IOException
-
-