Module org.elasticsearch.server
Package org.elasticsearch.rest
Interface IndexingPressureAwareContentAggregator.CompletionHandler
- Enclosing class:
IndexingPressureAwareContentAggregator
public static interface IndexingPressureAwareContentAggregator.CompletionHandler
Callback for request body accumulation lifecycle events.
-
Method Summary
Modifier and TypeMethodDescriptionvoidonComplete(RestChannel channel, ReleasableBytesReference content, Releasable indexingPressureRelease) Called when the full request body has been successfully accumulated.voidonFailure(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.
-
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 responsecontent- the aggregated request bodyindexingPressureRelease- releases the indexing pressure reservation when closed
-
onFailure
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 responsee- the exception describing the failure
-