org.elasticsearch.action.bulk
Class BulkResponse

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

public class BulkResponse
extends Object
implements ActionResponse, 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
 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!).
 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 String buildFailureMessage()

items

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


iterator

public Iterator<BulkItemResponse> iterator()
Specified by:
iterator in interface Iterable<BulkItemResponse>

readFrom

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

writeTo

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


Copyright © 2009-2012. All Rights Reserved.