Interface IndexingPressureAwareContentAggregator.CompletionHandler

Enclosing class:
IndexingPressureAwareContentAggregator

public static interface IndexingPressureAwareContentAggregator.CompletionHandler
Callback for request body accumulation lifecycle events.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    onComplete(RestChannel channel, ReleasableBytesReference content, Releasable indexingPressureRelease)
    Called when the full request body has been successfully accumulated.
    void
    Called when a failure occurs during content accumulation, such as the request body exceeding the maximum allowed size or the indexing pressure reservation being rejected.
  • Method Details

    • onComplete

      void onComplete(RestChannel channel, ReleasableBytesReference content, Releasable indexingPressureRelease)
      Called when the full request body has been successfully accumulated.
      Parameters:
      channel - the REST channel for sending the response
      content - the aggregated request body
      indexingPressureRelease - releases the indexing pressure reservation when closed
    • onFailure

      void onFailure(RestChannel channel, Exception e)
      Called when a failure occurs during content accumulation, such as the request body exceeding the maximum allowed size or the indexing pressure reservation being rejected.
      Parameters:
      channel - the REST channel for sending the error response
      e - the exception describing the failure