org.elasticsearch.action.bulk
Class BulkResponse

java.lang.Object
  extended by org.elasticsearch.action.bulk.BulkResponse
All Implemented Interfaces:
java.lang.Iterable<BulkItemResponse>, ActionResponse, Streamable

public class BulkResponse
extends java.lang.Object
implements ActionResponse, java.lang.Iterable<BulkItemResponse>

A response of a bulk execution. Holding a response for each item responding (in order) of the bulk requests. Each item holds the index/type/id is operated on, and if it failed or not (with the failure message).


Constructor Summary
BulkResponse(BulkItemResponse[] responses, long tookInMillis)
           
 
Method Summary
 java.lang.String buildFailureMessage()
           
 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.
 BulkItemResponse[] items()
          The items representing each action performed in the bulk operation (in the same order!).
 java.util.Iterator<BulkItemResponse> iterator()
           
 void readFrom(StreamInput in)
           
 TimeValue took()
          How long the bulk execution took.
 long tookInMillis()
          How long the bulk execution took in milliseconds.
 void writeTo(StreamOutput out)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BulkResponse

public BulkResponse(BulkItemResponse[] responses,
                    long tookInMillis)
Method Detail

took

public TimeValue took()
How long the bulk execution took.


getTook

public TimeValue getTook()
How long the bulk execution took.


tookInMillis

public long tookInMillis()
How long the bulk execution took in milliseconds.


getTookInMillis

public long getTookInMillis()
How long the bulk execution took in milliseconds.


hasFailures

public boolean hasFailures()
Has anything failed with the execution.


buildFailureMessage

public java.lang.String buildFailureMessage()

items

public BulkItemResponse[] items()
The items representing each action performed in the bulk operation (in the same order!).


iterator

public java.util.Iterator<BulkItemResponse> iterator()
Specified by:
iterator in interface java.lang.Iterable<BulkItemResponse>

readFrom

public void readFrom(StreamInput in)
              throws java.io.IOException
Specified by:
readFrom in interface Streamable
Throws:
java.io.IOException

writeTo

public void writeTo(StreamOutput out)
             throws java.io.IOException
Specified by:
writeTo in interface Streamable
Throws:
java.io.IOException