org.hibernate.search.elasticsearch.work.impl

## Class DefaultElasticsearchRequestSuccessAssessor

- java.lang.Object
- - org.hibernate.search.elasticsearch.work.impl.DefaultElasticsearchRequestSuccessAssessor

- All Implemented Interfaces:
    ElasticsearchRequestSuccessAssessor

      public class DefaultElasticsearchRequestSuccessAssessor
      extends Object
      implements ElasticsearchRequestSuccessAssessor

  Author:
    Yoann Rodiere

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `DefaultElasticsearchRequestSuccessAssessor.Builder`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static DefaultElasticsearchRequestSuccessAssessor` | `INSTANCE`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static DefaultElasticsearchRequestSuccessAssessor.Builder` | `builder()`
    `void` | `checkSuccess(ElasticsearchResponse response)` Check the given response, throwing an exception if the reponse indicates a failure.
    `void` | `checkSuccess(com.google.gson.JsonObject bulkResponseItem)` Check the given bulk response item, return `true` if it is successful, `false` otherwise.
    `String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### INSTANCE

          public static final DefaultElasticsearchRequestSuccessAssessor INSTANCE

  - ### Method Detail

    - #### builder

          public static DefaultElasticsearchRequestSuccessAssessor.Builder builder()

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### checkSuccess

          public void checkSuccess(ElasticsearchResponse response)
                            throws SearchException

      Description copied from interface: `ElasticsearchRequestSuccessAssessor`
      Check the given response, throwing an exception if the reponse indicates a failure.
      Specified by:
        `checkSuccess` in interface `ElasticsearchRequestSuccessAssessor`
      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)

      Description copied from interface: `ElasticsearchRequestSuccessAssessor`
      Check the given bulk response item, return `true` if it is successful, `false` otherwise.
      Specified by:
        `checkSuccess` in interface `ElasticsearchRequestSuccessAssessor`
      Parameters:
        `bulkResponseItem` - The part of the response body concerning the request whose success is to be assessed.

Copyright © 2006-2017 Red Hat, Inc. All Rights Reserved