Class BulkProcessor


  • public class BulkProcessor
    extends Object
    A bulk processor wrapper that makes flush() a synchronous operation.
    See Also:
    BulkProcessor
    • Constructor Detail

      • BulkProcessor

        public BulkProcessor​(java.util.function.Supplier<org.elasticsearch.action.bulk.BulkProcessor> internalProcessorSupplier)
        Creates a new instance.
        Parameters:
        internalProcessor - The org.elasticsearch.action.bulk.BulkProcessor supplier. This supplier must return a new BulkProcessor instance each time Supplier.get() is called.
        Since:
        14.0.0
    • Method Detail

      • add

        public void add​(org.elasticsearch.action.index.IndexRequest request)
        Since:
        14.0.0
        See Also:
        BulkProcessor.add(org.elasticsearch.action.index.IndexRequest)
      • add

        public void add​(org.elasticsearch.action.delete.DeleteRequest request)
        Since:
        14.0.0
        See Also:
        BulkProcessor.add(org.elasticsearch.action.delete.DeleteRequest)
      • flush

        public void flush()
        Throws:
        IllegalStateException - if the internal bulk processor couldn't be closed in 5 minutes
        RuntimeException - if the thread is interrupted while waiting
        Since:
        14.0.0
        See Also:
        BulkProcessor.flush()