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 io.searchbox.client.JestClient |
createClient(Map<String,String> config,
String indexName)
Creates a client from information in the config map.
|
static void |
createIndex(io.searchbox.client.JestClient client,
String indexName,
String settingsName)
Creates an index.
|
static io.searchbox.client.JestClient |
createJestClient(Map<String,String> config,
String indexName)
Creates a transport client from a configuration map.
|
static io.searchbox.client.JestClient |
createJestClient(String protocol,
String host,
int port,
String indexName,
String username,
String password,
boolean initialize)
Creates and caches a Jest client from host and port.
|
static io.searchbox.client.JestClient |
createLocalClient(Map<String,String> config,
String indexName)
Creates a local client from a configuration map.
|
static io.searchbox.client.JestClient |
createLocalClient(String className,
String fieldName,
String indexName)
Creates a cache by looking it up in a static field.
|
static void |
initializeClient(io.searchbox.client.JestClient client,
String indexName)
Called to initialize the storage.
|
public static void clearClientCache()
public static io.searchbox.client.JestClient createClient(Map<String,String> config, String indexName)
config - the configurationindexName - the index to usepublic static io.searchbox.client.JestClient createJestClient(Map<String,String> config, String indexName)
config - the configurationindexName - the name of the indexpublic static io.searchbox.client.JestClient createJestClient(String protocol, String host, int port, String indexName, String username, String password, boolean initialize)
protocol - http or httpshost - the hostport - the portinitialize - true if the index should be initializedpublic static io.searchbox.client.JestClient createLocalClient(Map<String,String> config, String indexName)
config - the config from apiman.propertiesindexName - the name of the ES indexpublic static io.searchbox.client.JestClient createLocalClient(String className, String fieldName, String indexName)
className - the class namefieldName - the field nameindexName - the name of the ES indexpublic static void initializeClient(io.searchbox.client.JestClient client,
String indexName)
Copyright © 2015 JBoss, a division of Red Hat. All rights reserved.