All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.yanyun.log.configuration.properties.ElasticSearchProperties Maven / Gradle / Ivy

There is a newer version: 1.0.8
Show newest version
package com.yanyun.log.configuration.properties;

import org.springframework.boot.context.properties.ConfigurationProperties;

/**
 * ES 的配置类
 */
@ConfigurationProperties(prefix = "gather.es")
public class ElasticSearchProperties {
    //连接地址,多个地址以逗号隔开
    private String url;
    //索引名称,索引的类型不需要设置在6.0之后一个索引下只能有一个索引类型
    private String indexName;

    //index超时时间 单位毫秒
    private Integer connectionRequestTimeout;
    //连接超时时间 单位毫秒
    private Integer connectTimeout;
    //socket连接时间 单位毫秒
    private Integer socketTimeout;
    //分片数量
    private Integer shards;
    //副本数量
    private Integer replicas;

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getIndexName() {
        return indexName;
    }

    public void setIndexName(String indexName) {
        this.indexName = indexName;
    }

    public Integer getConnectionRequestTimeout() {
        return connectionRequestTimeout;
    }

    public void setConnectionRequestTimeout(Integer connectionRequestTimeout) {
        this.connectionRequestTimeout = connectionRequestTimeout;
    }

    public Integer getConnectTimeout() {
        return connectTimeout;
    }

    public void setConnectTimeout(Integer connectTimeout) {
        this.connectTimeout = connectTimeout;
    }

    public Integer getSocketTimeout() {
        return socketTimeout;
    }

    public void setSocketTimeout(Integer socketTimeout) {
        this.socketTimeout = socketTimeout;
    }

    public Integer getShards() {
        return shards;
    }

    public void setShards(Integer shards) {
        this.shards = shards;
    }

    public Integer getReplicas() {
        return replicas;
    }

    public void setReplicas(Integer replicas) {
        this.replicas = replicas;
    }



    @Override
    public String toString() {
        return "ElasticSearchProperties{" +
                "url='" + url + '\'' +
                ", indexName='" + indexName + '\'' +
                ", connectionRequestTimeout=" + connectionRequestTimeout +
                ", connectTimeout=" + connectTimeout +
                ", socketTimeout=" + socketTimeout +
                ", shards=" + shards +
                ", replicas=" + replicas +
                '}';
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy