Class MaxRamBulkOperationBuffer

java.lang.Object
com.atlassian.confluence.plugins.opensearch.bulk.MaxRamBulkOperationBuffer
All Implemented Interfaces:
BulkOperationBuffer

public class MaxRamBulkOperationBuffer extends Object implements BulkOperationBuffer
Applies automatic flush to a delegate BulkOperationBuffer so that it does not exceed the specified RAM limit (MB).
Since:
9.0
  • Constructor Details

    • MaxRamBulkOperationBuffer

      public MaxRamBulkOperationBuffer(BulkOperationBuffer delegate, double limitMB)
  • Method Details

    • add

      public void add(org.opensearch.client.opensearch.core.bulk.BulkOperation op) throws IOException
      Description copied from interface: BulkOperationBuffer
      Add a bulk operation to the buffer. Adding an operation might trigger a flush depending on the implementation.
      Specified by:
      add in interface BulkOperationBuffer
      Parameters:
      op - The operation to add to the buffer
      Throws:
      IOException
    • flush

      public void flush() throws IOException
      Description copied from interface: BulkOperationBuffer
      Send all pending bulk operations in the buffer to OpenSearch bulk API
      Specified by:
      flush in interface BulkOperationBuffer
      Throws:
      IOException
    • getDelegate

      public BulkOperationBuffer getDelegate()
    • getLimitMB

      public double getLimitMB()