OnActionErrorOptions<T> Class

  • java.lang.Object
    • com.azure.search.documents.options.OnActionErrorOptions<T>

Type Parameters

T

Type of the document in the action.

public final class OnActionErrorOptions

Options passed when SearchClientBuilder.SearchIndexingBufferedSenderBuilder#onActionError(Consumer) is called.

Constructor Summary

Constructor Description
OnActionErrorOptions(IndexAction<T> action)

Creates a new OnActionErrorOptions object.

Method Summary

Modifier and Type Method and Description
IndexAction<T> getAction()

Gets the action.

IndexingResult getIndexingResult()

Gets the indexing result of the action.

Throwable getThrowable()

Gets the throwable that caused the action to fail.

OnActionErrorOptions<T> setIndexingResult(IndexingResult indexingResult)

Sets the indexing result of the action with a non-retryable status code.

OnActionErrorOptions<T> setThrowable(Throwable throwable)

Sets the throwable that caused the action failed.

Methods inherited from java.lang.Object

Constructor Details

OnActionErrorOptions

public OnActionErrorOptions(IndexAction action)

Creates a new OnActionErrorOptions object.

Parameters:

action - Action that failed with an error.

Method Details

getAction

public IndexAction getAction()

Gets the action.

Returns:

The action.

getIndexingResult

public IndexingResult getIndexingResult()

Gets the indexing result of the action.

Returns:

The indexing result of the action.

getThrowable

public Throwable getThrowable()

Gets the throwable that caused the action to fail.

Returns:

The throwable that caused the action to fail.

setIndexingResult

public OnActionErrorOptions setIndexingResult(IndexingResult indexingResult)

Sets the indexing result of the action with a non-retryable status code.

Parameters:

indexingResult - The indexing result for the action.

Returns:

The updated OnActionErrorOptions object.

setThrowable

public OnActionErrorOptions setThrowable(Throwable throwable)

Sets the throwable that caused the action failed.

Parameters:

throwable - Throwable that caused the action to fail.

Returns:

The updated OnActionErrorOptions object.

Applies to