public class ESClientFactory extends Object
| Constructor and Description |
|---|
ESClientFactory() |
| Modifier and Type | Method and Description |
|---|---|
static void |
clearClientCache()
Clears all the clients from the cache.
|
static org.elasticsearch.client.Client |
createClient(Map<String,String> config)
Creates a client from information in the config map.
|
static org.elasticsearch.client.Client |
createLocalClient(Map<String,String> config)
Creates a local client from a configuration map.
|
static org.elasticsearch.client.Client |
createLocalClient(String className,
String fieldName)
Creates a cache by looking it up in a static field.
|
static org.elasticsearch.client.Client |
createTransportClient(Map<String,String> config)
Creates a transport client from a configuration map.
|
static org.elasticsearch.client.Client |
createTransportClient(String host,
int port,
String clusterName)
Creates and caches a transport client from host, port, and cluster name info.
|
public static void clearClientCache()
public static org.elasticsearch.client.Client createClient(Map<String,String> config)
config - the configurationpublic static org.elasticsearch.client.Client createTransportClient(Map<String,String> config)
config - the configurationpublic static org.elasticsearch.client.Client createLocalClient(Map<String,String> config)
config - the configurationpublic static org.elasticsearch.client.Client createTransportClient(String host, int port, String clusterName)
host - the hostport - the portclusterName - the cluster nameCopyright © 2015 JBoss, a division of Red Hat. All rights reserved.