Interface ActionRequestFailureHandler
-
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
IgnoringFailureHandler,NoOpFailureHandler,RetryRejectedExecutionFailureHandler
@Deprecated @PublicEvolving public interface ActionRequestFailureHandler extends Serializable
Deprecated.This has been deprecated and will be removed in the future.An implementation ofActionRequestFailureHandleris provided by the user to define how failedActionRequestsshould be handled, e.g. dropping them, reprocessing malformed documents, or simply requesting them to be sent to Elasticsearch again if the failure is only temporary.Example:
{@code private static class ExampleActionRequestFailureHandler implements ActionRequestFailureHandler {
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description voidonFailure(org.elasticsearch.action.ActionRequest action, Throwable failure, int restStatusCode, RequestIndexer indexer)Deprecated.Handle a failedActionRequest.
-
-
-
Method Detail
-
onFailure
void onFailure(org.elasticsearch.action.ActionRequest action, Throwable failure, int restStatusCode, RequestIndexer indexer) throws ThrowableDeprecated.Handle a failedActionRequest.- Parameters:
action- theActionRequestthat failed due to the failurefailure- the cause of failurerestStatusCode- the REST status code of the failure (-1 if none can be retrieved)indexer- request indexer to re-add the failed action, if intended to do so- Throws:
Throwable- if the sink should fail on this failure, the implementation should rethrow the exception or a custom one
-
-