public class ElasticClientUtils
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
ElasticClientUtils.RetryIoException
Determines if an
IOException is suitable for retry. |
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
DEFAULT_TIMEOUT |
| Modifier and Type | Method and Description |
|---|---|
static void |
configure(com.fasterxml.jackson.databind.ObjectMapper mapper,
VersionComponents version) |
static void |
configureIndexSerialization(com.fasterxml.jackson.databind.ObjectMapper mapper) |
static ElasticClient |
createElasticClient(java.lang.String elasticUrl,
okhttp3.OkHttpClient client,
com.fasterxml.jackson.databind.ObjectMapper objectMapper,
VersionComponents version) |
static <T> com.github.rholder.retry.Retryer<T> |
createElasticRetryer() |
static boolean |
retryIfResponse(int status)
Returns true if call to Elastic should be retried.
|
static boolean |
retryIfResponse(retrofit2.Response<?> response)
Returns true if call to Elastic should be retried.
|
static About |
waitForElasticReady(ElasticClient elasticClient,
long timeout,
java.util.concurrent.TimeUnit unit) |
public static final java.lang.String DEFAULT_TIMEOUT
public static void configure(com.fasterxml.jackson.databind.ObjectMapper mapper,
VersionComponents version)
public static void configureIndexSerialization(com.fasterxml.jackson.databind.ObjectMapper mapper)
public static ElasticClient createElasticClient(java.lang.String elasticUrl, okhttp3.OkHttpClient client, com.fasterxml.jackson.databind.ObjectMapper objectMapper, VersionComponents version)
public static <T> com.github.rholder.retry.Retryer<T> createElasticRetryer()
public static boolean retryIfResponse(int status)
status - status code from HTTP responsepublic static boolean retryIfResponse(retrofit2.Response<?> response)
response - response from last call to Elasticpublic static About waitForElasticReady(ElasticClient elasticClient, long timeout, java.util.concurrent.TimeUnit unit)