class ElasticSearchTransportClient implements ElasticSearchClient {

  @Override
  public void addEvent(Event event, IndexNameBuilder indexNameBuilder,
      String indexType, long ttlMs) throws Exception {
    if (bulkRequestBuilder == null) {
      bulkRequestBuilder = client.prepareBulk();
    }

    IndexRequestBuilder indexRequestBuilder = null;
    if (indexRequestBuilderFactory == null) {
      indexRequestBuilder = client
          .prepareIndex(indexNameBuilder.getIndexName(event), indexType)
          .setSource(serializer.getContentBuilder(event).bytes());
    } else {
      indexRequestBuilder = indexRequestBuilderFactory.createIndexRequest(
          client, indexNameBuilder.getIndexPrefix(event), indexType, event);
    }

    if (ttlMs > 0) {
      indexRequestBuilder.setTTL(ttlMs);
    }
    bulkRequestBuilder.add(indexRequestBuilder);
  }

  public  ElasticSearchTransportClient(String[] hostNames, String clusterName,
      ElasticSearchEventSerializer serializer);
  public  ElasticSearchTransportClient(String[] hostNames, String clusterName,
      ElasticSearchIndexRequestBuilderFactory indexBuilder);
  public  ElasticSearchTransportClient(ElasticSearchIndexRequestBuilderFactory indexBuilderFactory);
  public  ElasticSearchTransportClient(ElasticSearchEventSerializer serializer);
  public  ElasticSearchTransportClient(Client client,
      ElasticSearchEventSerializer serializer);
  public  ElasticSearchTransportClient(Client client,
                                      ElasticSearchIndexRequestBuilderFactory requestBuilderFactory);

}