Search in sources :

Example 1 with ElasticConnection

use of org.ff4j.elastic.ElasticConnection in project ff4j by ff4j.

the class EventRepositoryElasticTest method initRepository.

@Override
protected EventRepository initRepository() {
    ElasticConnection connection = null;
    try {
        connection = new ElasticConnection(ElasticConnectionMode.JEST_CLIENT, "ff4j", new URL("http://localhost:9200"));
    } catch (MalformedURLException e) {
        logger.error(e.getMessage(), e);
    }
    EventRepository elasticStore = new EventRepositoryElastic(connection);
    elasticStore.createSchema();
    return elasticStore;
}
Also used : MalformedURLException(java.net.MalformedURLException) ElasticConnection(org.ff4j.elastic.ElasticConnection) EventRepository(org.ff4j.audit.repository.EventRepository) URL(java.net.URL)

Aggregations

MalformedURLException (java.net.MalformedURLException)1 URL (java.net.URL)1 EventRepository (org.ff4j.audit.repository.EventRepository)1 ElasticConnection (org.ff4j.elastic.ElasticConnection)1