@IocBean public class ElasticsearchStarter extends Object implements ServerFace
| 限定符和类型 | 字段和说明 |
|---|---|
protected org.elasticsearch.client.transport.TransportClient |
client |
protected org.nutz.ioc.impl.PropertiesProxy |
conf |
protected org.nutz.ioc.Ioc |
ioc |
protected static String |
PRE |
static String |
PROP_CLIENT_TRANSPORT_SNIFF |
static String |
PROP_CLUSTER_NAME |
static String |
PROP_HOST |
static String |
PROP_PORT |
| 构造器和说明 |
|---|
ElasticsearchStarter() |
| 限定符和类型 | 方法和说明 |
|---|---|
org.elasticsearch.client.transport.TransportClient |
getElasticsearchClient() |
void |
start() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitfailsafe, isRunning, stop@Inject(value="refer:$ioc") protected org.nutz.ioc.Ioc ioc
@Inject protected org.nutz.ioc.impl.PropertiesProxy conf
protected org.elasticsearch.client.transport.TransportClient client
@PropDoc(value="Elasticsearch\u7684ip\u5730\u5740", defaultValue="127.0.0.1", need=true) public static final String PROP_HOST
@PropDoc(value="Elasticsearch\u7684\u7aef\u53e3", defaultValue="9300", type="int", need=true) public static final String PROP_PORT
@PropDoc(value="Elasticsearch\u7684\u96c6\u7fa4\u540d\u79f0", defaultValue="elasticsearch", need=true) public static final String PROP_CLUSTER_NAME
public void start()
throws Exception
start 在接口中 ServerFaceException@IocBean(name="elasticsearchClient",
depose="close")
public org.elasticsearch.client.transport.TransportClient getElasticsearchClient()
throws UnknownHostException
Copyright © 2020. All rights reserved.