public class BulkResponse extends ActionResponse implements java.lang.Iterable<BulkItemResponse>, StatusToXContentObject
TransportResponse.EmptyToXContent.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, remoteAddressclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisFragmentpublic 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
StreamablereadFrom in interface StreamablereadFrom in class ActionResponsejava.io.IOExceptionpublic void writeTo(StreamOutput out) throws java.io.IOException
StreamablewriteTo in interface StreamablewriteTo in class ActionResponsejava.io.IOExceptionpublic RestStatus status()
StatusToXContentObjectstatus in interface StatusToXContentObjectpublic XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
toXContent in interface ToXContentjava.io.IOExceptionpublic static BulkResponse fromXContent(XContentParser parser) throws java.io.IOException
java.io.IOException