org.hibernate.search.elasticsearch.client.impl

## Class DefaultElasticsearchClient

- java.lang.Object
- - org.hibernate.search.elasticsearch.client.impl.DefaultElasticsearchClient

- All Implemented Interfaces:
    Closeable, AutoCloseable, ElasticsearchClient, ElasticsearchClientImplementor

      public class DefaultElasticsearchClient
      extends Object
      implements ElasticsearchClientImplementor

  Author:
    Yoann Rodiere

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DefaultElasticsearchClient(org.elasticsearch.client.RestClient restClient, org.elasticsearch.client.sniff.Sniffer sniffer, int requestTimeoutValue, TimeUnit requestTimeoutUnit, GsonProvider initialGsonProvider)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()`
    `void` | `init(GsonProvider gsonProvider)`
    `CompletableFuture<ElasticsearchResponse>` | `submit(ElasticsearchRequest request)`

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

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

- - ### Constructor Detail

    - #### DefaultElasticsearchClient

          public DefaultElasticsearchClient(org.elasticsearch.client.RestClient restClient,
                                            org.elasticsearch.client.sniff.Sniffer sniffer,
                                            int requestTimeoutValue,
                                            TimeUnit requestTimeoutUnit,
                                            GsonProvider initialGsonProvider)

  - ### Method Detail

    - #### init

          public void init(GsonProvider gsonProvider)

      Specified by:
        `init` in interface `ElasticsearchClientImplementor`

    - #### submit

          public CompletableFuture<ElasticsearchResponse> submit(ElasticsearchRequest request)

      Specified by:
        `submit` in interface `ElasticsearchClient`
      Parameters:
        `request` - A request to execute asynchronously
      Returns:
        The future that will ultimately hold the response (or throw an exception if an error occurred or if the request timed out).

    - #### close

          public void close()
                     throws IOException

      Specified by:
        `close` in interface `Closeable`
      Specified by:
        `close` in interface `AutoCloseable`
      Throws:
        `IOException`

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