Class BulkItemRequest

java.lang.Object
org.elasticsearch.action.bulk.BulkItemRequest
All Implemented Interfaces:
org.apache.lucene.util.Accountable, Writeable

public class BulkItemRequest
extends java.lang.Object
implements Writeable, org.apache.lucene.util.Accountable
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable

    Writeable.Reader<V>, Writeable.Writer<V>
  • Field Summary

    Fields inherited from interface org.apache.lucene.util.Accountable

    NULL_ACCOUNTABLE
  • Constructor Summary

    Constructors
    Constructor Description
    BulkItemRequest​(int id, DocWriteRequest<?> request)  
  • Method Summary

    Modifier and Type Method Description
    void abort​(java.lang.String index, java.lang.Exception cause)
    Abort this request, and store a BulkItemResponse.Failure response.
    int id()  
    java.lang.String index()  
    long ramBytesUsed()  
    DocWriteRequest<?> request()  
    void writeThin​(StreamOutput out)  
    void writeTo​(StreamOutput out)
    Write this into the StreamOutput.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.apache.lucene.util.Accountable

    getChildResources
  • Constructor Details

    • BulkItemRequest

      public BulkItemRequest​(int id, DocWriteRequest<?> request)
  • Method Details

    • id

      public int id()
    • request

      public DocWriteRequest<?> request()
    • index

      public java.lang.String index()
    • abort

      public void abort​(java.lang.String index, java.lang.Exception cause)
      Abort this request, and store a BulkItemResponse.Failure response.
      Parameters:
      index - The concrete index that was resolved for this request
      cause - The cause of the rejection (may not be null)
      Throws:
      java.lang.IllegalStateException - If a response already exists for this request
    • writeTo

      public void writeTo​(StreamOutput out) throws java.io.IOException
      Description copied from interface: Writeable
      Write this into the StreamOutput.
      Specified by:
      writeTo in interface Writeable
      Throws:
      java.io.IOException
    • writeThin

      public void writeThin​(StreamOutput out) throws java.io.IOException
      Throws:
      java.io.IOException
    • ramBytesUsed

      public long ramBytesUsed()
      Specified by:
      ramBytesUsed in interface org.apache.lucene.util.Accountable