博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
elasticSearch6源码分析(11)client
阅读量:7181 次
发布时间:2019-06-29

本文共 5438 字,大约阅读时间需要 18 分钟。

1.RestClient

/** * Client that connects to an Elasticsearch cluster through HTTP. * 

* Must be created using {

@link RestClientBuilder}, which allows to set all the different options or just rely on defaults. * The hosts that are part of the cluster need to be provided at creation time, but can also be replaced later * by calling {
@link #setNodes(Collection)}. *

* The method {

@link #performRequest(Request)} allows to send a request to the cluster. When * sending a request, a host gets selected out of the provided ones in a round-robin fashion. Failing hosts are marked dead and * retried after a certain amount of time (minimum 1 minute, maximum 30 minutes), depending on how many times they previously * failed (the more failures, the later they will be retried). In case of failures all of the alive nodes (or dead nodes that * deserve a retry) are retried until one responds or none of them does, in which case an {
@link IOException} will be thrown. *

* Requests can be either synchronous or asynchronous. The asynchronous variants all end with {

@code Async}. *

* Requests can be traced by enabling trace logging for "tracer". The trace logger outputs requests and responses in curl format. */

2.RestHighLevelClient

/** * High level REST client that wraps an instance of the low level {
@link RestClient} and allows to build requests and read responses. * The {
@link RestClient} instance is internally built based on the provided {
@link RestClientBuilder} and it gets closed automatically * when closing the {
@link RestHighLevelClient} instance that wraps it. * In case an already existing instance of a low-level REST client needs to be provided, this class can be subclassed and the * {
@link #RestHighLevelClient(RestClient, CheckedConsumer, List)} constructor can be used. * This class can also be sub-classed to expose additional client methods that make use of endpoints added to Elasticsearch through * plugins, or to add support for custom response sections, again added to Elasticsearch through plugins. */

2.1 IndicesClient

/** * A wrapper for the {
@link RestHighLevelClient} that provides methods for accessing the Indices API. *

* See Indices API on elastic.co */

2.2 ClusterClient

/** * A wrapper for the {
@link RestHighLevelClient} that provides methods for accessing the Cluster API. *

* See Cluster API on elastic.co */

2.3 IngestClient

/** * A wrapper for the {
@link RestHighLevelClient} that provides methods for accessing the Ingest API. *

* See Ingest API on elastic.co */

2.4 SnapshotClient

/** * A wrapper for the {
@link RestHighLevelClient} that provides methods for accessing the Snapshot API. *

* See Snapshot API on elastic.co */

2.5 TasksClient

/** * A wrapper for the {
@link RestHighLevelClient} that provides methods for accessing the Tasks API. *

* See Task Management API on elastic.co */

2.6 XPackClient

/** * A wrapper for the {
@link RestHighLevelClient} that provides methods for * accessing the Elastic Licensed X-Pack APIs that are shipped with the * default distribution of Elasticsearch. All of these APIs will 404 if run * against the OSS distribution of Elasticsearch. *

* See the * X-Pack APIs on elastic.co for more information. */

2.7 WatcherClient

/**     * Start the watch service     * See      * the docs for more.     * @param request the request     * @param options the request options (e.g. headers), use {
@link RequestOptions#DEFAULT} if nothing needs to be customized * @return the response * @throws IOException in case there is a problem sending the request or parsing back the response */

2.8 GraphClient

/**     * Executes an exploration request using the Graph API.     *     * See Graph API     * on elastic.co.     */

2.9 LicenseClient

/** * A wrapper for the {
@link RestHighLevelClient} that provides methods for * accessing the Elastic License-related methods *

* See the * X-Pack Licensing APIs on elastic.co for more information. */

2.10 MigrationClient

/** * A wrapper for the {
@link RestHighLevelClient} that provides methods for * accessing the Elastic License-related methods *

* See the * X-Pack Migration APIs on elastic.co for more information. */

2.11 MachineLearningClient

/** * Machine Learning API client wrapper for the {
@link RestHighLevelClient} *

* See the * X-Pack Machine Learning APIs for additional information. */

2.12 SecurityClient

/** * A wrapper for the {
@link RestHighLevelClient} that provides methods for accessing the Security APIs. *

* See Security APIs on elastic.co */

2.13 RollupClient

/** * A wrapper for the {
@link RestHighLevelClient} that provides methods for * accessing the Elastic Rollup-related methods *

* See the * X-Pack Rollup APIs on elastic.co for more information. */

3.TransportClient

/** * The transport client allows to create a client that is not part of the cluster, but simply connects to one * or more nodes directly by adding their respective addresses using * {
@link #addTransportAddress(org.elasticsearch.common.transport.TransportAddress)}. *

* The transport client important modules used is the {

@link org.elasticsearch.common.network.NetworkModule} which is * started in client mode (only connects, no bind). * * @deprecated {
@link TransportClient} is deprecated in favour of the High Level REST client and will * be removed in Elasticsearch 8.0. */

 

转载地址:http://obszm.baihongyu.com/

你可能感兴趣的文章
炒股票之数学
查看>>
<转载>构造函数与拷贝构造函数
查看>>
基类中定义的虚函数,子类中必须要覆盖吗?为什么?
查看>>
SingleNumber
查看>>
linux 硬盘分区与挂载
查看>>
GStreamer 1x play mp4 file
查看>>
后缀数组模板
查看>>
我的友情链接
查看>>
走向DBA[MSSQL篇] 面试官最喜欢的问题 ----索引+C#面试题客串
查看>>
在7层分发中,http,mysql是如何控制数据包的走向的
查看>>
RHEL5下部署LAMP+SVN+SSL
查看>>
LINUX REDHAT第九单元练习题
查看>>
我的友情链接
查看>>
一时所想
查看>>
Linux cat 学习之路(1)
查看>>
cobbler自动化部署多种类型的操作系统,一个软件全部搞定
查看>>
tdpsql 相关笔记
查看>>
我的友情链接
查看>>
顺序队列和链式队列的实现
查看>>
python 关键字 之 and 与 or
查看>>