class HTTPBulkLoader {

  public void addAction(String source, ActionRequest req) throws Throwable {
//    if (logger.isTraceEnabled()) {
//      logger.trace(String.format("Add action: key %s, index %s/%s, doc %s", req.key, req.index, req.docType, req.document));
//    }
    BulkableAction<DocumentResult> action = convertToJestAction(req);
    WriterCommand addCmd = WriterCommand.getAddCmd(new SourcedActionRequest(source, req, action));
    sendCmd(addCmd);
  }

  public  HTTPBulkLoader(Config config, JestClient client, Optional<Consumer<BulkReport>> onFlushOpt);

}