public class BulkItemResponse extends Object implements Streamable
Modifier and Type | Class and Description |
---|---|
static class |
BulkItemResponse.Failure
Represents a failure.
|
Constructor and Description |
---|
BulkItemResponse(int id,
String opType,
ActionWriteResponse response) |
BulkItemResponse(int id,
String opType,
BulkItemResponse.Failure failure) |
Modifier and Type | Method and Description |
---|---|
BulkItemResponse.Failure |
getFailure()
The actual failure object if there was a failure.
|
String |
getFailureMessage()
The failure message, null if it did not fail.
|
String |
getId()
The id of the action.
|
String |
getIndex()
The index name of the action.
|
int |
getItemId()
The numeric order of the item matching the same request order in the bulk request.
|
String |
getOpType()
The operation type ("index", "create" or "delete").
|
<T extends ActionWriteResponse> |
getResponse()
The actual response (
IndexResponse or DeleteResponse ). |
String |
getType()
The type of the action.
|
long |
getVersion()
The version of the action.
|
boolean |
isFailed()
Is this a failed execution of an operation.
|
static BulkItemResponse |
readBulkItem(StreamInput in) |
void |
readFrom(StreamInput in) |
void |
writeTo(StreamOutput out) |
public BulkItemResponse(int id, String opType, ActionWriteResponse response)
public BulkItemResponse(int id, String opType, BulkItemResponse.Failure failure)
public int getItemId()
public String getOpType()
public String getIndex()
public String getType()
public String getId()
public long getVersion()
public <T extends ActionWriteResponse> T getResponse()
IndexResponse
or DeleteResponse
). null in
case of failure.public boolean isFailed()
public String getFailureMessage()
public BulkItemResponse.Failure getFailure()
public static BulkItemResponse readBulkItem(StreamInput in) throws IOException
IOException
public void readFrom(StreamInput in) throws IOException
readFrom
in interface Streamable
IOException
public void writeTo(StreamOutput out) throws IOException
writeTo
in interface Streamable
IOException
Copyright © 2009–2016. All rights reserved.