Interface ElasticsearchClient
-
- All Known Subinterfaces:
ElasticsearchClientImplementor
public interface ElasticsearchClient
An Elasticsearch client, allowing to perform requests to a remote cluster.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description CompletableFuture<ElasticsearchResponse>
submit(ElasticsearchRequest request)
<T> T
unwrap(Class<T> clientClass)
Unwrap the client to some implementation-specific type.
-
-
-
Method Detail
-
submit
CompletableFuture<ElasticsearchResponse> submit(ElasticsearchRequest request)
- 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).
-
unwrap
<T> T unwrap(Class<T> clientClass)
Unwrap the client to some implementation-specific type.- Type Parameters:
T
- The expected client type- Parameters:
clientClass
- TheClass
representing the expected client type- Returns:
- The unwrapped client.
- Throws:
SearchException
- if the client implementation does not support unwrapping to the given class.
-
-