Class OnActionErrorOptions<T>
- java.lang.Object
-
- com.azure.search.documents.options.OnActionErrorOptions<T>
-
- Type Parameters:
T
- Type of the document in the action.
public final class OnActionErrorOptions<T> extends Object
Options passed whenSearchClientBuilder.SearchIndexingBufferedSenderBuilder.onActionError(Consumer)
is called.
-
-
Constructor Summary
Constructors Constructor Description OnActionErrorOptions(IndexAction<T> action)
Creates a new OnActionErrorOptions object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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.
-
-
-
Constructor Detail
-
OnActionErrorOptions
public OnActionErrorOptions(IndexAction<T> action)
Creates a new OnActionErrorOptions object.- Parameters:
action
- Action that failed with an error.
-
-
Method Detail
-
getAction
public IndexAction<T> getAction()
Gets the action.- Returns:
- The action.
-
setThrowable
public OnActionErrorOptions<T> 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.
-
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<T> 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.
-
getIndexingResult
public IndexingResult getIndexingResult()
Gets the indexing result of the action.- Returns:
- The indexing result of the action.
-
-