Class ElasticsearchRequestSuccessAssessor
- java.lang.Object
-
- org.hibernate.search.backend.elasticsearch.work.impl.ElasticsearchRequestSuccessAssessor
-
public class ElasticsearchRequestSuccessAssessor extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classElasticsearchRequestSuccessAssessor.Builder
-
Field Summary
Fields Modifier and Type Field Description static ElasticsearchRequestSuccessAssessorDEFAULT_INSTANCEstatic ElasticsearchRequestSuccessAssessorSHARD_FAILURE_CHECKED_INSTANCE
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ElasticsearchRequestSuccessAssessor.Builderbuilder()voidcheckSuccess(com.google.gson.JsonObject bulkResponseItem)Check the given bulk response item, throwing an exception if it indicates a failure.voidcheckSuccess(ElasticsearchResponse response)Check the given response, throwing an exception if the reponse indicates a failure.StringtoString()
-
-
-
Field Detail
-
SHARD_FAILURE_CHECKED_INSTANCE
public static final ElasticsearchRequestSuccessAssessor SHARD_FAILURE_CHECKED_INSTANCE
-
DEFAULT_INSTANCE
public static final ElasticsearchRequestSuccessAssessor DEFAULT_INSTANCE
-
-
Method Detail
-
builder
public static ElasticsearchRequestSuccessAssessor.Builder builder()
-
checkSuccess
public void checkSuccess(ElasticsearchResponse response) throws SearchException
Check the given response, throwing an exception if the reponse indicates a failure.- Parameters:
response- The response, containing information about the outcome of the request.- Throws:
SearchException- If the result is a failure.
-
checkSuccess
public void checkSuccess(com.google.gson.JsonObject bulkResponseItem)
Check the given bulk response item, throwing an exception if it indicates a failure.- Parameters:
bulkResponseItem- The part of the response body concerning the request whose success is to be assessed.- Throws:
SearchException- If the result is a failure.
-
-