public class ElasticSearchClient<TEntity> extends Object implements IElasticSearchClient<TEntity>
| Constructor and Description |
|---|
ElasticSearchClient(org.elasticsearch.client.Client client,
String indexName,
IElasticSearchMapping mapping,
BulkProcessorConfiguration bulkProcessorConfiguration) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
awaitClose(long timeout,
TimeUnit unit) |
void |
close() |
void |
flush() |
void |
index(List<TEntity> entities) |
void |
index(java.util.stream.Stream<TEntity> entities) |
void |
index(TEntity entity) |
public ElasticSearchClient(org.elasticsearch.client.Client client,
String indexName,
IElasticSearchMapping mapping,
BulkProcessorConfiguration bulkProcessorConfiguration)
public void index(TEntity entity)
index in interface IElasticSearchClient<TEntity>public void index(List<TEntity> entities)
index in interface IElasticSearchClient<TEntity>public void index(java.util.stream.Stream<TEntity> entities)
index in interface IElasticSearchClient<TEntity>public void flush()
flush in interface IElasticSearchClient<TEntity>public boolean awaitClose(long timeout,
TimeUnit unit)
throws InterruptedException
awaitClose in interface IElasticSearchClient<TEntity>InterruptedExceptionpublic void close()
throws Exception
close in interface AutoCloseableExceptionCopyright © 2019. All rights reserved.