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)
           
 
Method Summary
 java.lang.String buildFailureMessage()
           
 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)
           
 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)
Method Detail

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