public class BulkResponse extends ActionResponse implements java.lang.Iterable<BulkItemResponse>, StatusToXContentObject
TransportResponse.Empty
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
Modifier and Type | Field and Description |
---|---|
static long |
NO_INGEST_TOOK |
EMPTY_PARAMS
Constructor and Description |
---|
BulkResponse(BulkItemResponse[] responses,
long tookInMillis) |
BulkResponse(BulkItemResponse[] responses,
long tookInMillis,
long ingestTookInMillis) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
buildFailureMessage() |
static BulkResponse |
fromXContent(XContentParser parser) |
TimeValue |
getIngestTook()
If ingest is enabled returns the bulk ingest preprocessing time, otherwise 0 is returned.
|
long |
getIngestTookInMillis()
If ingest is enabled returns the bulk ingest preprocessing time.
|
BulkItemResponse[] |
getItems()
The items representing each action performed in the bulk operation (in the same order!).
|
TimeValue |
getTook()
How long the bulk execution took.
|
long |
getTookInMillis()
How long the bulk execution took in milliseconds.
|
boolean |
hasFailures()
Has anything failed with the execution.
|
java.util.Iterator<BulkItemResponse> |
iterator() |
void |
readFrom(StreamInput in)
Set this object's fields from a StreamInput.
|
RestStatus |
status()
Returns the REST status to make sure it is returned correctly
|
XContentBuilder |
toXContent(XContentBuilder builder,
ToXContent.Params params) |
void |
writeTo(StreamOutput out)
Write this object's fields to a StreamOutput.
|
remoteAddress, remoteAddress
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isFragment
public static final long NO_INGEST_TOOK
public BulkResponse(BulkItemResponse[] responses, long tookInMillis)
public BulkResponse(BulkItemResponse[] responses, long tookInMillis, long ingestTookInMillis)
public TimeValue getTook()
public long getTookInMillis()
public TimeValue getIngestTook()
public long getIngestTookInMillis()
public boolean hasFailures()
public java.lang.String buildFailureMessage()
public BulkItemResponse[] getItems()
public java.util.Iterator<BulkItemResponse> iterator()
iterator
in interface java.lang.Iterable<BulkItemResponse>
public void readFrom(StreamInput in) throws java.io.IOException
Streamable
readFrom
in interface Streamable
readFrom
in class ActionResponse
java.io.IOException
public void writeTo(StreamOutput out) throws java.io.IOException
Streamable
writeTo
in interface Streamable
writeTo
in class ActionResponse
java.io.IOException
public RestStatus status()
StatusToXContentObject
status
in interface StatusToXContentObject
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
toXContent
in interface ToXContent
java.io.IOException
public static BulkResponse fromXContent(XContentParser parser) throws java.io.IOException
java.io.IOException