public static ElasticConnection getConnection(String hostname, int transportPort) { return getConnection(hostname, transportPort, DEFAULT_FLUSH_INTERVAL_STRING, DEFAULT_BULK_LISTENER); }
public static ElasticConnection getConnection(String hostname) { return getConnection(hostname, DEFAULT_TRANSPORT_PORT, DEFAULT_FLUSH_INTERVAL_STRING, DEFAULT_BULK_LISTENER); }
private static ElasticConnection getEsConnection() { if (CONNECTION == null) { String hostname = Configuration.INSTANCE.getString(ElasticConstants.ES_HOSTNAME_PARAM, "localhost"); int transportPort = Configuration.INSTANCE.getInt(ElasticConstants.ES_TRANSPORT_PORT_PARAM, 9300); CONNECTION = ElasticConnection.getConnection(hostname, transportPort); } return CONNECTION; } }