Class BulkIngester<Context>

java.lang.Object
co.elastic.clients.elasticsearch._helpers.bulk.BulkIngester<Context>
All Implemented Interfaces:
AutoCloseable

public class BulkIngester<Context> extends Object implements AutoCloseable
  • Method Details

    • maxOperations

      public int maxOperations()
      The configured max operations to buffer in a single bulk request.
    • maxSize

      public long maxSize()
      The configured maximum size in bytes for a bulk request. Operations are added to the request until adding an operation leads the request to exceed this siz.
    • maxConcurrentRequests

      public int maxConcurrentRequests()
      The configured maximum number of concurrent request sent to Elasticsearch.
    • flushInterval

      public Duration flushInterval()
      The configured flush period.
    • pendingOperations

      public int pendingOperations()
      The number of operations that have been buffered, waiting to be sent.
    • pendingOperationsSize

      public long pendingOperationsSize()
      The size in bytes of operations that have been buffered, waiting to be sent.
    • pendingRequests

      public int pendingRequests()
      The number of in flight bulk requests.
    • operationsCount

      public long operationsCount()
      Statistics: the number of operations that were added to this ingester since it was created.
    • operationContentionsCount

      public long operationContentionsCount()
      Statistics: the number of operations that had to wait before being added because the operation buffer was full and the number of http requests in flight exceeded the configured maximum number.
      See Also:
    • requestCount

      public long requestCount()
      Statistics: the number of bulk requests that were produced by this ingester since it was created.
    • requestContentionsCount

      public long requestContentionsCount()
      Statistics: the number of bulk requests that could not be sent immediately because the number of http requests in flight exceeded the configured maximum number.
      See Also:
      • BulkIngester.Builder.maxConcurrentRequests
    • flush

      public void flush()
    • add

      public void add(BulkOperation operation, Context context)
    • add

      public void add(BulkOperation operation)
    • add

    • add

    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
    • of

      public static <Context> BulkIngester<Context> of(Function<BulkIngester.Builder<Context>,BulkIngester.Builder<Context>> f)