public class ElasticClientWithRetry extends java.lang.Object implements ElasticClient
| Constructor and Description |
|---|
ElasticClientWithRetry(ElasticClient delegate) |
ElasticClientWithRetry(ElasticClient delegate,
com.github.rholder.retry.Retryer<java.lang.Object> retryer) |
| Modifier and Type | Method and Description |
|---|---|
About |
about() |
BulkResponse |
bulk(java.lang.String operations,
java.lang.Boolean pretty) |
ClusterHealth |
clusterHealth() |
ClusterHealth |
clusterHealth(ClusterHealth.Status waitForStatus,
java.lang.String timeout) |
ClusterHealth |
clusterHealthForIndex(java.lang.String names,
ClusterHealth.Status waitForStatus,
java.lang.String timeout) |
IndexCreated |
createIndex(java.lang.String name,
Index index)
Create an index in Elastic.
|
IndexDeleted |
deleteAllIndexes()
Delete all indexes from Elastic.
|
DeletedDocument |
deleteDocument(java.lang.String name,
java.lang.String type,
java.lang.String id) |
DeletedDocument |
deleteDocument(java.lang.String name,
java.lang.String type,
java.lang.String id,
long epochMillisUtc) |
IndexDeleted |
deleteIndex(java.lang.String names)
Deletes a comma separated list of index names from Elastic.
|
protected <T> T |
executeWithRetry(java.util.concurrent.Callable<T> callable) |
Document |
getDocument(java.lang.String name,
java.lang.String type,
java.lang.String id,
java.lang.String sourceFields) |
Documents |
getDocuments(Mget mget) |
VersionComponents |
getVersion() |
IndexedDocument |
indexDocument(java.lang.String name,
java.lang.String type,
java.lang.String id,
java.lang.String document)
Indexes a document using default versioning scheme, which simply increments the document
version number.
|
IndexedDocument |
indexDocument(java.lang.String name,
java.lang.String type,
java.lang.String id,
java.lang.String document,
long epochMillisUtc)
Indexes a document using an external versioning scheme, based upon milliseconds since epoch
(UTC timezone).
|
boolean |
indexExists(java.lang.String name)
Checks to see if specified index exists
Elastic will return a success code (HTTP 200) if the index exists, otherwise it returns an
HTTP 404 (not found).
|
Nodes |
nodes() |
Refresh |
refreshAllIndexes() |
Refresh |
refreshIndex(java.lang.String names) |
SearchResponse |
search(java.lang.String name,
Search search) |
public ElasticClientWithRetry(ElasticClient delegate)
public ElasticClientWithRetry(ElasticClient delegate, com.github.rholder.retry.Retryer<java.lang.Object> retryer)
public About about() throws ElasticException
about in interface ElasticClientElasticExceptionpublic BulkResponse bulk(java.lang.String operations, java.lang.Boolean pretty) throws ElasticException
bulk in interface ElasticClientElasticExceptionpublic ClusterHealth clusterHealth() throws ElasticException
clusterHealth in interface ElasticClientElasticExceptionpublic ClusterHealth clusterHealth(ClusterHealth.Status waitForStatus, java.lang.String timeout) throws ElasticException
clusterHealth in interface ElasticClientElasticExceptionpublic ClusterHealth clusterHealthForIndex(java.lang.String names, ClusterHealth.Status waitForStatus, java.lang.String timeout) throws ElasticException
clusterHealthForIndex in interface ElasticClientElasticExceptionpublic IndexCreated createIndex(java.lang.String name, Index index) throws ElasticException
ElasticClientcreateIndex in interface ElasticClientname - index nameindex - index configurationElasticException - if there an exception making HTTP requestpublic IndexDeleted deleteAllIndexes() throws ElasticException
ElasticClientdeleteAllIndexes in interface ElasticClientElasticException - if there an exception making HTTP requestpublic DeletedDocument deleteDocument(java.lang.String name, java.lang.String type, java.lang.String id) throws ElasticException
deleteDocument in interface ElasticClientElasticExceptionpublic DeletedDocument deleteDocument(java.lang.String name, java.lang.String type, java.lang.String id, long epochMillisUtc) throws ElasticException
deleteDocument in interface ElasticClientElasticExceptionpublic IndexDeleted deleteIndex(java.lang.String names) throws ElasticException
ElasticClientdeleteIndex in interface ElasticClientnames - comma separated list of index namesElasticException - if there an exception making HTTP requestpublic Document getDocument(java.lang.String name, java.lang.String type, java.lang.String id, java.lang.String sourceFields) throws ElasticException
getDocument in interface ElasticClientElasticExceptionpublic Documents getDocuments(Mget mget) throws ElasticException
getDocuments in interface ElasticClientElasticExceptionpublic VersionComponents getVersion()
getVersion in interface ElasticClientpublic IndexedDocument indexDocument(java.lang.String name, java.lang.String type, java.lang.String id, java.lang.String document) throws ElasticException
ElasticClientindexDocument in interface ElasticClientname - index nametype - mapping typeid - document iddocument - document that is being indexedElasticException - if there an exception making HTTP requestpublic IndexedDocument indexDocument(java.lang.String name, java.lang.String type, java.lang.String id, java.lang.String document, long epochMillisUtc) throws ElasticException
ElasticClientindexDocument in interface ElasticClientname - index nametype - mapping typeid - document iddocument - document that is being indexedepochMillisUtc - Number of milliseconds since epoch (normalized to UTC time)ElasticException - if there an exception making HTTP requestpublic boolean indexExists(java.lang.String name)
throws ElasticException
ElasticClientindexExists in interface ElasticClientname - index nameElasticException - if there an exception making HTTP requestpublic Nodes nodes() throws ElasticException
nodes in interface ElasticClientElasticExceptionpublic Refresh refreshAllIndexes() throws ElasticException
refreshAllIndexes in interface ElasticClientElasticExceptionpublic Refresh refreshIndex(java.lang.String names) throws ElasticException
refreshIndex in interface ElasticClientElasticExceptionpublic SearchResponse search(java.lang.String name, Search search)
search in interface ElasticClientprotected <T> T executeWithRetry(java.util.concurrent.Callable<T> callable)
throws ElasticException
ElasticException