类 ESBuilder.ProducerBuilder
java.lang.Object
tech.mhuang.pacebox.elasticsearch.admin.ESBuilder.ProducerBuilder
- 所有已实现的接口:
tech.mhuang.pacebox.core.builder.BaseBuilder<ESInfo.ESBean>
- 封闭类:
- ESBuilder
public static class ESBuilder.ProducerBuilder
extends Object
implements tech.mhuang.pacebox.core.builder.BaseBuilder<ESInfo.ESBean>
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明builder()connectionRequestTimeout(Integer connectionRequestTimeout) 设置连接超时时间毫秒级 默认3000 3秒connectionTimeout(Integer connectionTimeout) 设置客户端连接超时时间毫秒级 默认10000 10秒connectNum(Integer connectNum) 设置客户端连接数 默认20connectPerRoute(Integer connectPerRoute) 设置连接并发数 默认10enable(boolean enable) 配置是否启动配置、默认不启动、要使用需要设置为启动socketTimeout(Integer socketTimeout) 设置socket超时时间毫秒级 默认40000 40秒设置es的ip或者是对应name
-
构造器详细资料
-
ProducerBuilder
public ProducerBuilder()
-
-
方法详细资料
-
enable
配置是否启动配置、默认不启动、要使用需要设置为启动- 参数:
enable- 启动- 返回:
- ProducerBuilder
-
url
设置es的ip或者是对应name- 参数:
ipPort- ipPort- 返回:
- this
-
connectNum
设置客户端连接数 默认20- 参数:
connectNum- 客户端连接数- 返回:
- this
-
connectPerRoute
设置连接并发数 默认10- 参数:
connectPerRoute- 连接并发数- 返回:
- this
-
connectionRequestTimeout
设置连接超时时间毫秒级 默认3000 3秒- 参数:
connectionRequestTimeout- 连接超时时间- 返回:
- this
-
socketTimeout
设置socket超时时间毫秒级 默认40000 40秒- 参数:
socketTimeout- socket超时时间- 返回:
- this
-
connectionTimeout
设置客户端连接超时时间毫秒级 默认10000 10秒- 参数:
connectionTimeout- 客户端连接超时时间- 返回:
- ProducerBuilder
-
builder
- 指定者:
builder在接口中tech.mhuang.pacebox.core.builder.BaseBuilder<ESInfo.ESBean>
-