001/* 002 * Copyright 2012-2017 the original author or authors. 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016 017package org.springframework.boot.autoconfigure.data.elasticsearch; 018 019import java.util.HashMap; 020import java.util.Map; 021 022import org.springframework.boot.context.properties.ConfigurationProperties; 023 024/** 025 * Configuration properties for Elasticsearch. 026 * 027 * @author Artur Konczak 028 * @author Mohsin Husen 029 * @since 1.1.0 030 */ 031@ConfigurationProperties(prefix = "spring.data.elasticsearch") 032public class ElasticsearchProperties { 033 034 /** 035 * Elasticsearch cluster name. 036 */ 037 private String clusterName = "elasticsearch"; 038 039 /** 040 * Comma-separated list of cluster node addresses. 041 */ 042 private String clusterNodes; 043 044 /** 045 * Additional properties used to configure the client. 046 */ 047 private Map<String, String> properties = new HashMap<>(); 048 049 public String getClusterName() { 050 return this.clusterName; 051 } 052 053 public void setClusterName(String clusterName) { 054 this.clusterName = clusterName; 055 } 056 057 public String getClusterNodes() { 058 return this.clusterNodes; 059 } 060 061 public void setClusterNodes(String clusterNodes) { 062 this.clusterNodes = clusterNodes; 063 } 064 065 public Map<String, String> getProperties() { 066 return this.properties; 067 } 068 069 public void setProperties(Map<String, String> properties) { 070 this.properties = properties; 071 } 072 073}